Call Spring.GetConfigInt from _post?

Call Spring.GetConfigInt from _post?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Call Spring.GetConfigInt from _post?

Post by Forboding Angel »

https://springrts.com/wiki/Lua_UnsyncedCtrl

Is there any way to do this? One of the holy grails of customization would be writing to and reading from a user accessible configuration file. We now have that ability thanks to Spring.GetConfigInt and Spring.SetConfigInt. For example, in post I want to be able to define sets of building groundplates that a player might see, based upon his settings in springsettings.

Essentially it would boil down to if setting=0 then none, setting=1 something else, etc. A nice nifty way around springs global setting of either ALL THE DECALS or None of the decals. But this is just one example.

My question is whether we can read values from springsettings in _post, even if it needs a gadget go-between?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Call Spring.GetConfigInt from _post?

Post by yuritch »

It looks like a synced unitdef change. That is, you shouldn't do that based on one machine springsettings (unless it's for SP only).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Call Spring.GetConfigInt from _post?

Post by Forboding Angel »

Shit. You're right. Hmm, perhaps ground decals should be done unsynced with a widget? But yeah good point.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Call Spring.GetConfigInt from _post?

Post by FLOZi »

For that specific rewquest, jK is working on shader based decals and a lua api for them
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Call Spring.GetConfigInt from _post?

Post by smoth »

FLOZi wrote:For that specific rewquest, jK is working on shader based decals and a lua api for them
Awesome!
Post Reply

Return to “Game Development”