Changing command ??

Changing command ??

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
zaky
Posts: 5
Joined: 29 Jun 2011, 19:31

Changing command ??

Post by zaky »

Alright sorry if its not the correct section to talk about it.
I'm trying to make my little brother(mid school) interested in game developing and find spring to be a good start (though he like FPS game better than RTS).
I wanted to try to show him some simple things such as changing the command attack to "serang" -> indonesian for attack(I'm indonesian). But i can seem to find the parameter to change. I look in the game folder(gamedata, LuaUI etc) & Spring folder. The closest thing i found is spring.h.lua.
So is it possible to change the command in game to different words?
If so which file or what method that I must do?
Btw I use xta as the base game.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Changing command ??

Post by Licho »

You should pick a different goal, renaming engine command "attack" is hard. You would need to code command handler in lua.
zaky
Posts: 5
Joined: 29 Jun 2011, 19:31

Re: Changing command ??

Post by zaky »

Hmmm i see, well no problem , I can use other things such as unit making & etc.
But is it really hard to rename the command? How to do it actually? Because most of young people here is really ignorant with their english.
Another thing,what AI is easiest to configure for new programmer in your opinion? (actually i'm a web programmer so this kind of thing isn't really my forte).
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Changing command ??

Post by FLOZi »

If you just want to change the text on the button, that is easy:

http://spring1944.svn.sourceforge.net/v ... iew=markup

Line 35 changes 'Reclaim' to 'Salvage', a similar change for Attack is just as trivial.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Changing command ??

Post by AF »

If you're using XTA as the basegame, you can use Shard, you can modify the entire AI if you wish, but since you're a beginner, taskqueues.lua should do the trick, its a simple data structure that defines what the AI should build, listed in order from start to finish.
zaky
Posts: 5
Joined: 29 Jun 2011, 19:31

Re: Changing command ??

Post by zaky »

Thanks for the tip to change the text & also AI gonna try the taskqueues
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Changing command ??

Post by AF »

If you have questions or suggestions about it let me know
Post Reply

Return to “Engine”