Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Learn me good!
Learn me good! [message #411245] Wed, 18 November 2009 02:26 Go to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
I am struggling with something and would like some help.
Spoony requested a fix for the Nod rocket soldier so that the preset has some damage points associated with it, a clear bug that it currently doesn't...

I said I would do this, and I will... It isn't really difficult, but I want to take the opportunity to learn something and make a plugin that's a little more useful while I'm at it.

My plan is to allow server owners to configure the damage points for any preset, without having to directly modify the objects.ddb file on the server.

I could write a huge list in an ini file of all the presets, and assign them some floating point value for the damage point to be set on object created event. However, this is not very dynamic, it's incredibly static and boring...

What I would ideally like to do is allow the server owner to create a list of presets themselves, and then that list of presets would form what the rest of the keys in the .ini file would be. Meaning that the ini file would only consist of presets and keys that they wanted to change. Making it dynamic and more efficient.

My first attempt at this was to use the iniclasswrapper in the SSGM plugin example. I first used loadlist to read all the preset names, and then based on this list I wanted to do a little loop, but that doesn't really work...

I suppose what I would really need is soemthing like loadlist, but something that is Two dimensional, so it can take the preset name as a string, then the floating value for the damage points after it.

I want to open my mind a little bit on this. I am not averse to moving away from the iniclasswrapper and just digging into the iniclass itself. Perhaps get even scarier and have a look at xml files?

I'll get Spoony's fix done one way or another, I might even make a really quick static fox for him now actually. However, I would like to expand on this idea. I'm just a little stuck really.

If anyone has any suggestions, please post. However, what would be really kind is an example.



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: request - Nod Rocket Soldier bug
Next Topic: music not working for map
Goto Forum:
  


Current Time: Thu Dec 19 06:45:24 MST 2024

Total time taken to generate the page: 0.00718 seconds