OK, I'm trying to build a shield that can change it's own statistics by destroying itself and creating a new shield with a new set of stats. So far so good. When the initial 'starter' shield is defined it has not only the normal stats (HP, HPBonus etc) but also a series of variables assigned to the playership that mirror these initial stats. Thus I don't need to read the stats, just the variables, to find what the statistics of the current shield are to change them.
However, if I want to install more than one type of these kind of shield, say uninstall one I've been training a while for one that's barely got any XP, then the old variables in the playership will be used as soon as the new shield upgrades, not the new shields current stats.... Soooo, I was thinking that I can use the playership variables as a temporary sump. When the created new shield is installed during it's upgrade it loads these playership variables into itself as shield variables. This makes no difference to the shield as is, but when I upgrade it a further time it loads these shield variables as a starter for the next upgrade. Then all I have to do is parse them back into the Ship variables to carry over to the NEXT upgrade. Etc.
Nice idea... but this is all conception right now as I have no idea how to do dynamic type item creation. I've got a lot of programming experience, but next to none in XML or specifically transcendence modding.
Several points.
1) How do I define a new item so it has it's own unique ID from any other shield that is upgrading? I need to use that ID to assign variables to just that shield when it upgrades.
2) How do I seperate uninstalling and installing a shield from the itemcreate install during an upgrade? I don't want uninstalling to do the same thing somehow, just when it auto upgrades. I could use a secondary variable check, set to nill for most of the time, then set to true during the upgrade... but how long does this last? Should I have a tick counter untill the 'true' set wears off?
3) Most important is there an actual tutorial somewhere on the dynamic item creation? I've looked and haven't found one here or on Xelerus yet. Even a well labelled example of creating an item would be a good start. Like I said I've been programming for well over 20 years (Basic, pascal, C, some assembler and G&M code for CNC Machines) so I'm OK on general stuff, just the specifics of transcendence I'm not aware of. I'm getting the hang of the basics, switch, setq and getting into dockscreens at the moment but it's slow going.
Dynamic Types and transferring data.
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
I recommend joining irc and talking to a guy called Sdw195, he has done a lot of work with typcreate
now to answer your Q's
1) typDynamicUNID
2) shpremovedevice and shipinstalldevice
3) see my first line, or http://www.neurohack.com/transcendence/ ... 046#p45046
and finally,
IRC
(sorry, i am a bit brain dead atm )
![Very Happy :D](./images/smilies/icon_biggrin.gif)
now to answer your Q's
1) typDynamicUNID
2) shpremovedevice and shipinstalldevice
3) see my first line, or http://www.neurohack.com/transcendence/ ... 046#p45046
and finally,
IRC
![Wink ;)](./images/smilies/icon_wink.gif)
(sorry, i am a bit brain dead atm )
![Image](https://dl.dropbox.com/u/4543270/xps/Mod%20of%20the%20Month%20banners.gif)
![Image](https://dl.dropbox.com/u/4543270/xps/201111.jpeg)
![Image](https://dl.dropbox.com/u/4543270/xps/20122.jpeg)
![Image](http://img262.imageshack.us/img262/7055/10494dt9.png)
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Not sure how likely I'll be to meet anyone on IRC as I'm on 10 hr shifts at work and my time at home is a little limited at present, but I might give it a go over the weekend (maybe not this weekend, I'm a little busy... we'll see).
Thanks for the tips, that helps quite a bit.![Smile :)](./images/smilies/icon_smile.gif)
btw, what time zone is this guy sdw195 in? Just in case I do manage to get on IRC. I'm Eastern US time, Florida to be precise, and likely the only times I might be available are sometime between 3PM and 6PM (will vary), and maybe a little before 10PM for a short time.
Thanks for the tips, that helps quite a bit.
![Smile :)](./images/smilies/icon_smile.gif)
btw, what time zone is this guy sdw195 in? Just in case I do manage to get on IRC. I'm Eastern US time, Florida to be precise, and likely the only times I might be available are sometime between 3PM and 6PM (will vary), and maybe a little before 10PM for a short time.
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Sdw is in New Zealand. You could always check the usermap on google to see where everybody is at (I'm on a phone right now, so no link though ![Sad :(](./images/smilies/icon_sad.gif)
![Sad :(](./images/smilies/icon_sad.gif)
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
![Image](http://res.mostlynothing.info/ircs.png)
![Image](https://dl.dropbox.com/u/23352181/MoTM%20current.gif)
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat
![Image](http://res.mostlynothing.info/ircs.png)
![Image](https://dl.dropbox.com/u/23352181/MoTM%20current.gif)
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
-
- Militia Captain
- Posts: 779
- Joined: Wed Nov 18, 2009 1:01 am
- Location: Still looking for the csc Antarctica
- Contact:
he was on irc last nightRPC wrote:Sdw is in New Zealand. You could always check the usermap on google to see where everybody is at (I'm on a phone right now, so no link though
![Smile :)](./images/smilies/icon_smile.gif)
![Razz :P](./images/smilies/icon_razz.gif)
![Image](https://dl.dropbox.com/u/4543270/xps/Mod%20of%20the%20Month%20banners.gif)
![Image](https://dl.dropbox.com/u/4543270/xps/201111.jpeg)
![Image](https://dl.dropbox.com/u/4543270/xps/20122.jpeg)
![Image](http://img262.imageshack.us/img262/7055/10494dt9.png)
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Yeah, I don't get as much time to mess with this stuff as I want, so I check stuff out when I get home from work or in the morning before I head out or the weekends when I'm not working Saturdays. Plus I'm on EST, a little different from New Zealand time *grins*
But if anyone wants me to program a CNC to mill some complex shape for them, I'm your man
Been doing that for over 8 years now. Plus I've been a clock repairer, electrical grid mapper, clerk, artist, sculpter, writer... OK those last three are hobbies, but I do have a novel 2/3 written... been that way for a while though *sigh* Gotta get back into that!
(EDIT: IRC is wacky!... or was that just me?)
But if anyone wants me to program a CNC to mill some complex shape for them, I'm your man
![Smile :)](./images/smilies/icon_smile.gif)
(EDIT: IRC is wacky!... or was that just me?)