View unanswered posts | View active topics It is currently Sat Dec 28, 2024 3:28 pm



Reply to topic  [ 4 posts ] 
 Modifying price of objects during game doable ? 
Author Message
User avatar

Joined: Mon Mar 14, 2011 2:07 pm
Posts: 22
Reply with quote
Post 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.


Mon Mar 12, 2012 1:38 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Thu Mar 15, 2012 6:59 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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.


Thu Mar 15, 2012 9:55 am
Profile
User avatar

Joined: Mon Mar 14, 2011 2:07 pm
Posts: 22
Reply with quote
Post 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 ^^


Thu Mar 15, 2012 12:32 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.023s | 13 Queries | GZIP : Off ]