More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: ScoobyDoo on 2007 December 05, 10:35:43



Title: Troubles with tokens
Post by: ScoobyDoo on 2007 December 05, 10:35:43
Has anyone seen this: I create a token, I do a force error and the log shows the token, however when I save the lot and re-enter it, the token no longer exists on the sim?

Edit: what difference is there between using the save button and saving using the return to neighborhood ("do you want to save before....?")?  It doesn't save the token with the save button, but does with the return to hood.  :-\


Title: Re: Troubles with tokens
Post by: dizzy on 2007 December 06, 00:30:08
Maybe it doesn't like the type of token you're creating. I haven't seen that problem with visible memory or personal inventory tokens, so I must assume you're doing something it doesn't like.


Title: Re: Troubles with tokens
Post by: ScoobyDoo on 2007 December 06, 01:21:10
The Add token of guid is non-visible, non-memory. 

I can create the token and it does show up when I do a force error, but the game doesn't seem to save it when leaving the lot.  BTW does it matter that the object that created the token is destroyed and recreated?  (it's crammys penis mod)


Title: Re: Troubles with tokens
Post by: J. M. Pescado on 2007 December 06, 01:32:46
You do not need to create any object before adding a token of that GUID. You are probably simply doing it wrong, but without more specific details of what you're doing, there's not much we can do to help. Manage Inventory is fussy.


Title: Re: Troubles with tokens
Post by: ScoobyDoo on 2007 December 06, 03:10:27
Heres the package at this point in time: http://scoobydoo.freespacemods.net/Problems/Downloads.rar (http://scoobydoo.freespacemods.net/Problems/Downloads.rar)

The controller is crammy's own work, from what i can tell, it creates and removes it when necessary.  The token for the accessory is created once the user makes some changes to the accessory itself. From what I can tell, the controller doesn't touch the accesory's token, instead it has it's own token.

YES!!!!!!! I believe I've found the bug. In order not to conflict with crammys original tokens, i re-guid my token.  Course makes sense now... the engine didn't see the guid of the token in the list of guids for accesories, objectes...etc so it simply decided to leave it out. I'll just have to give my first token entry a unique number like 1000, so I can detect if I'm reading in the old crammy token or my new entries.


Btw Pescado, would you or some very bhav knowledgeable person, go through my code when I've basically finished it, so I know I haven't made a really bad mistake?  When I'm done I'll write up a Word doc commenting the code.  (Oh how I wish there was a comment bhav)


Title: Re: Troubles with tokens
Post by: dizzy on 2007 December 06, 08:37:58
There are comment types, but as they very rarely appear from Maxis, they could not properly be reverse-engineered (which is what we're forced to do in order to mod anything).

As for QA, that's easy. If it goes boom then you did something wrong or Maxis added some more crap to their already bloated and heavily inconsistent arbitrary syntax.


Title: Re: Troubles with tokens
Post by: J. M. Pescado on 2007 December 06, 08:39:27
There are comment types, but as they very rarely appear from Maxis, they could not properly be reverse-engineered (which is what we're forced to do in order to mod anything).
A TRUE Klingon warrior does not comment his code!


Title: Re: Troubles with tokens
Post by: ScoobyDoo on 2007 December 06, 09:23:09
It's sorta like Perl... write once, read never   :D