Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wirelinks not saving through duping. #698

Closed
spider0804 opened this issue Aug 5, 2014 · 22 comments
Closed

Wirelinks not saving through duping. #698

spider0804 opened this issue Aug 5, 2014 · 22 comments
Labels

Comments

@spider0804
Copy link

Specifically this is wirelinking via having an e2 have a wirelink input, and linking with the advanced wire tool.

All will be well, I will have my gears for my transmission linked and then I save it and all is well and spawn it and save it and by some chance eventually one, a couple, or all of my wirelinks will unlink themselves.

If I relink the links all will be well until I save the creation again and spawn it, some of the wirelinks do not save.

Even though the props that get unlinked is random, the way the unlinked props spawn is not random.
For example... I dont know what will get unlinked but lets say it is gear 4...if gear 4 becomes unlinked no matter how many times I spawn that same dupe version, gear 4 will always be unlinked..

Wirelinking to actual props derps more often than wirelinking to an e2 prop, say a pod controller.

Another wirelinking glitch I have noticed is sometimes when you unwire a wirelink the e2 will still think it has a wirelink. For even though I unwire all the gears or acf gun or whatever it may be, and spawn the creation that way...the chip will spawn with the writing in red, even if it I just spawn the chip alone.

The only solution I know is to replace the chip entirely and rewire everything.

If you need examples of dupes I can make a few.

Hope this is enough info to go off of.

@natrim
Copy link
Contributor

natrim commented Aug 5, 2014

do the dupe examples, that is the fastest way for some dev to test it

@AbigailBuccaneer
Copy link
Contributor

What are you duping it with?

@AbigailBuccaneer
Copy link
Contributor

@Divran haven't we (ie. you) dealt with this exact issue before?

@spider0804
Copy link
Author

That issue was actual wiring, not wirelinks.

Like wiring W A S D Shift Alt from a pod controller, and replacing the controller did the trick.
I am sure that was from the wiremod restructure.

This is specifically wirelinks.
I know others have this problem because if I ever mention it they say they have the problem as well.

Another clue might be that it happens far more often when going to servers than when staying in my own personal lan game.

@Divran
Copy link
Contributor

Divran commented Aug 5, 2014

Wirelinking to props is pointless, so save yourself a lot of trouble and use entity inputs for that instead.
Please post a dupe (adv dupe 1 or 2 or both) with the problem so I can test it ingame.

@spider0804
Copy link
Author

Why is it pointless?
I have switched to an e marker but it is handier to just click then click to a prop instead of doing an emarker.

@Divran
Copy link
Contributor

Divran commented Aug 5, 2014

The only thing you can do with a wirelink to a prop is WLK:entity(), and then you might as well use an entity input in the first place.

@Xandaros
Copy link
Contributor

Xandaros commented Aug 5, 2014

It might be pointless, but it is still a feature, which is supposedly buggy.

@spider0804
Copy link
Author

Yea the setup I was using was

[Crankshaft BasePlate]:wirelink
Crank = Crankshaft:entity()
Base = BasePlate:entity()

I used this because just

Crankshaft:entity()
BasePlate:entity()

Will always unlink itself after a dupe, but the wirelink only sometimes does, got to use an entity marker for it to always work.

What about wirelinking to wire props, is there another way to pull data from a pod controller besides a wirelink?

This is how I do pod inputs.

Pod]:wirelink
Active = Pod["Active",number]
Shift = Pod["Shift",number]

@Divran
Copy link
Contributor

Divran commented Aug 5, 2014

Please post a dupe (adv dupe 1 or 2 or both) with the problem so I can test it ingame.

What about wirelinking to wire props, is there another way to pull data from a pod controller besides a wirelink?

Uh I think you've got the names of things wrong. Props are what we call inert objects, and entities are what we call objects that can do stuff (which are either made by valve or scripted in Lua by random people), such as doors, pod controllers, etc.

@spider0804
Copy link
Author

What about wirelinking to wire entities*, is there another way to pull data from a pod controller besides a wirelink?

Will get some dupes.

@Divran
Copy link
Contributor

Divran commented Aug 5, 2014

What about wirelinking to wire entities*, is there another way to pull data from a pod controller besides a wirelink?

Yes, using normal wires

@spider0804
Copy link
Author

"I used this because just

Crankshaft:entity()
BasePlate:entity()

Will always unlink itself after a dupe, but the wirelink only sometimes does, got to use an entity marker for it to always work."

Is that intended? I can get an example of that too, to clarify that is just using entity inputs on a chip wired directly to a prop.

Also I have not done much since the restructure so I am currently trying to make the error happen in a way that the dupe spawning once will have them wired up but if you copy it and spawn it again they will unwire, might take a bit.

@spider0804
Copy link
Author

Here is a weird example, All was wired when I saved it on the turret chip which is ontop of the speaker...dupe it and only cam and egp are wired...dupe it again and it says they are rewired but they are not.

So when you spawn it all but egp and cam will be unwired but if you dupe that and spawn it again it should say they are all wired again.

The chip is using both wirelinks to wire entities and :entity() inputs.

https://dl.dropboxusercontent.com/u/30989172/Wirelink%20example2.txt

@Divran
Copy link
Contributor

Divran commented Aug 6, 2014

I can't test that dupe because I can't find a working version of ACF.
EDIT: Nevermind I think I found one, finally.
EDIT: Github's upload servers are being slow as fuck (400 kb/s on my 100 mbit connection) so I'm going to have to test it tomorrow.
It would be a shit ton easier if you could post an example that doesn't use ACF.

@spider0804
Copy link
Author

I will try to redo the problem, it is like a once in every so often sort of thing so it might be a while.

What download link are you using for acf anyway?
Took me 5 mins or so to download it from the current git link.

https://github.com/nrlulz/ACF/trunk

@Divran
Copy link
Contributor

Divran commented Aug 6, 2014

Alright, I've tested it and I found some errors during pasting, which I've fixed. Should Chair [ENTITY] and TurretBase [ENTITY] be wired? Because they're not. All the others are wired properly, though, after I fixed it.
EDIT: Nevermind, they are supposed to be wired. I'm fixing that too now.

@Divran Divran closed this as completed in b80d76a Aug 6, 2014
@Divran
Copy link
Contributor

Divran commented Aug 6, 2014

The problem for wirelinks was that it was recreating the wirelink output more than once, causing the previous, already wired up wirelinks to become unwired. I added a check that aborts the wirelink output creation if a wirelink already exists on the entity.

The problem for entity outputs was that if the E2's ApplyDupeInfo function is called before the entity it is wired to's EntityModifiers have been loaded, the entity output doesn't yet exist. So I did the same for entity outputs as wirelink outputs. Pretty much copy pasted the code.

@XXXmags
Copy link

XXXmags commented Aug 6, 2014

Thank you for fixing this.

@Divran
Copy link
Contributor

Divran commented Aug 6, 2014

And thanks to @spider0804 for posting a broken dupe or I would never have been able to fix it

@spider0804
Copy link
Author

Improving Gmod one complaint at a time! :D

@Anticept
Copy link
Member

One thing github is missing that our forums has is titles. @spider0804 deserves a "wiremodder of the month" badge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants