Dynamic Types and transferring data.

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

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.
sdw195
Militia Captain
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 :D

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 )
Image
Image
Image
Image
"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"
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

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. :)

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.
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

most of irc users are around quite a bit. :P
Image
Image
RPC
Fleet Admiral
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 :(
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
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.
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

RPC 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 :(
he was on irc last night :) we had a good chat about what he wanted :P
Image
Image
Image
Image
"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"
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

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?)
Post Reply