Data Realms Fan Forums http://45.55.195.193/ |
|
Modifying price of objects during game doable ? http://45.55.195.193/viewtopic.php?f=1&t=30672 |
Page 1 of 1 |
Author: | albatros [ Mon Mar 12, 2012 1:38 pm ] |
Post subject: | Modifying price of objects during game doable ? |
Hello there. I'm currently doing some exploration on the intersection between economy and game design, and I though it could be fun to apply that to CC. What I'd like to do is modifying the price of the objects during gametime. I'm looking at the API, and I wonder if it is doable at all. The only reference to gold value I found is here: http://wiki.datarealms.com/index.php/Lu ... ceneObject But it is said that the gold value is read-only, plus from the description it seems it will affect the object and not the class. Maybe there is a buy function I missed that can be use to subtract or add something to the base price ? I won't bother the community with programming question I as already know Lua, but it would save me some massive amount of time I were told if considering modding CC this way is possible. |
Author: | Duh102 [ Thu Mar 15, 2012 6:59 am ] |
Post subject: | Re: Modifying price of objects during game doable ? |
Maybe you could bypass the hardcoded gold values entirely and instead use the add and subtract funds functions through sceneman (if that's the right manager)? You'd have to build your own table of costs, of course, but I believe it'd be doable. Not sure how you'd hook into finding when new units are ordered onto the battlefield, that would be the hard part. |
Author: | Azukki [ Thu Mar 15, 2012 9:55 am ] |
Post subject: | Re: Modifying price of objects during game doable ? |
Depending on the application, you might be able to just swap the item with a .ini defined copy of it with a different goldvalue setting. That wouldn't work too well for actors or presently held devices, but with unheld devices and basic objects that you only want to switch between several certain values it'd do. |
Author: | albatros [ Thu Mar 15, 2012 12:32 pm ] |
Post subject: | Re: Modifying price of objects during game doable ? |
Thank you both, I see much clearer now. I will consider both solution and make some tests ^^ |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |