Serious discussion on mods

Serious discussion on mods

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
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Serious discussion on mods

Post by Ace07 »

Currently, there is literally no mod support without (unsafely) moving files around to make it seem like the mod is the only thing for Spring to load (Correct me if I am wrong). I feel that this is not a good direction if we want to support "serious" mods of Spring in the future.

For example, in Quake 3 (sorry for bringing this up), they have a -mod option on the command line, and you can easily switch it in-game (for newbs). You can do all of this without moving all of the game-dependent files around. This is the kind of thing I want to see done in Spring. There should be a command line argument (-mod OTA) that can load the appropriate mod without moving any files around at all.

As most of you know, I am writing the new spring client, but have realized that coding a mod switcher will be more than a "hack" if anything. I don't want to hack this game to make it better, since hackjobs need to be redone at some point if we want to retain any credibility in the gaming world. So, what I propose is simple:

1) Someone codes (it could be me) a mod "loader" dll [in C++], or creates the routines and integrates them into the game

This mod loader will return all of the paths to the files that need to be loaded for spring to run the mod.

2) The engine is modified to accept a -mod command line argument and to use the mod loader routines to load only the files that the mod needs.

This will require quite a bit of editing to the source code of the game, but it will be worth it in my opinion. We really need a better mod loading system, because the current one isn't very well done.

What do you all think?


WARNING: Do not speak of the organization of how mods will be loaded (a lot of early mod loading threads have been ruined by this technical banter). This will be worked out later on by whomever needs to program it. In my opinion, it doesn't matter how it works, but if it works as intended.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Fnordia is the one who has been tasked with thsi problem, the SY's have already stated their itnentions to integrate a mod manager into spring, napalm cobra actually made a simple one before that announcement and stopped development as a result. Fnordia also posted examples of plans on how i would be stored.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

0.6 already contains mod support. Although just throwing a mod into the root might still work its meant that you place a mod in the mod folder and that it contains a modinfo.tdf just like the xta_se_v060.sdz does. Then you can switch in the lobby between different mods safely.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmmm I dont remember that in the changelog.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Yeah, the modinfo thing works. The only problem is that there is no frontend to choose a mod if you do single player... in any case:

http://wormhole.tauniverse.com/images/s ... leroom.gif ;)
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I didn't see that on the changelog...

Just out of curiosity: What is the command line argument to make spring load the desired mod?
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

I thinked it was in script.txt , but now, I'm not sure...
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Yes you can only change which mod is loaded via the script file currently.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

SJ wrote:Yes you can only change which mod is loaded via the script file currently.
What value do you change?

Mod=xxx

I looked in the documentation and there wasn't really anything on it.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

GameType=
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Is there a way of getting the modname and side through the callback without finding the commander, taking the commanders unit data, and checking its name against a list?
Post Reply

Return to “Engine”