soundmud / soundrts

A real-time strategy audio game
http://jlpo.free.fr/soundrts
Other
44 stars 32 forks source link

Have a campaign extend from a mod #11

Closed craigbrett17 closed 10 years ago

craigbrett17 commented 10 years ago

I'm interested in having a campaign based on a mod I'm creating. Currently, the best way to do that seems to be to copy+paste the mod into the campaign and make any campaign relevant changes and add any campaign only stuff on top. The problem comes in when/if I'd want to change the behaviour of one of the existing things in the underlying mod.

It would be neat if we could get a campaign to have its own "mods =" bit (or similar) in it somewhere. And have any rules.txt and style.txt (and so on) changes patched on top of them. It separates out the campaign from the main body of the mod itself.

soundmud commented 10 years ago

At the moment, the simplest way is to release a complete portable zip modded version of SoundRTS with "user/SoundRTS.ini" defining "mods=...", like in the complete version of Crazy Mod 8.2 . The additional files in the campaign will patch the rules and the style.

If this solution isn't convenient, maybe it wouldn't be too complicated to define mods from a map (Edit: to define which mods are required by a map). I need to think a little more about it. How would the game react if the required mods aren't currently loaded? if additional mods are provided? ask the player? etc.

craigbrett17 commented 10 years ago

Well, going from your comment, I went and deployed my Mod using an NSI installer. This did actually provide some advantages, such as customising the mods flag for the user and such like, as well as providing people with a version of the game that only has the relevant campaigns loaded. However, this might be slightly less achievable for people who don't know NSIS.

I'm not sure. There's a difference, say, between having a mod such as SoundPack loaded, as opposed to a mod like CrazyMod, which could completely change the workings of a campaign. Perhaps campaigns with a rules.txt and/or a style.txt might be disabled in a campaign unless they're specified in some kind of file in the campaign? I don't know what the most intuitive way would be for campaign creators. Maybe a campaign.txt file with a "mods=" flag?

Just some thoughts.

soundmud commented 10 years ago

The file could be called "mods.txt". It would contain either a comma separated list of the recommended mods, or maybe a space separated list of mods, since the commas aren't necessary in this case.

About the installer, be careful that the "user" sub folder is supposed to be writable, so with an installer it can be better to remove it. It will be automatically created in the home folder of the user. That's why the zip archive might be a best choice in this case. There is also the reusing of the provided Inno Setup scripts for the installer, but it would have to allow changing the names of the main folders with "SoundRTS" in it, to make sure that configurations are not mixed up.

sanslash332 commented 10 years ago

Hmm some doubt

how works the game when a map have its own styles.txt? As the jl4 map.

For example, if a map in its styles.txt defines a complex mod, like crazymod. The map will work properly?

And if the styles.txt requires some external files such a lot of sound files and you try play with it with a person that doesn't has these files. The map can load?

And why not implement this for the campaigns?

For example, you can define a styles.txt for each campaign, and, you can define another styles.txt for each chapter for each campaign. In the case if a particular chapter needs add more elements to the default styles.txt of the campaign.

From: soundmud Sent: Sunday, August 17, 2014 5:50 PM To: soundmud/soundrts Subject: Re: [soundrts] Have a campaign extend from a mod (#11)

The file could be called "mods.txt". It would contain either a comma separated list of the recommended mods, or maybe a space separated list of mods, since the commas aren't necessary in this case.

About the installer, be careful that the "user" sub folder is supposed to be writable, so with an installer it can be better to remove it. It will be automatically created in the home folder of the user. That's why the zip archive might be a best choice in this case. There is also the reusing of the provided Inno Setup scripts for the installer, but it would have to allow changing the names of the main folders with "SoundRTS" in it, to make sure that configurations are not mixed up.

— Reply to this email directly or view it on GitHub.

craigbrett17 commented 10 years ago

sanslash332 said:

"how works the game when a map have its own styles.txt? As the jl4 map.

For example, if a map in its styles.txt defines a complex mod, like crazymod. The map will work properly?"

This is for campaigns, not multiplayer maps. And they can already have their own rules.txt and ui stuff. We can't currently "define a mod" in styles.txt, so that won't be an issue.

sanslash332 said:

"And if the styles.txt requires some external files such a lot of sound files and you try play with it with a person that doesn't has these files. The map can load?"

yes, it can. It just won't play those sounds. Ideally we shouldn't be getting in scenarios where someone has a mod and a campaign that uses it but not those sounds, unless they've been manually deleting them.

sanslash332 said:

"And why not implement this for the campaigns?

For example, you can define a styles.txt for each campaign, and, you can define another styles.txt for each chapter for each campaign. In the case if a particular chapter needs add more elements to the default styles.txt of the campaign."

This is already possible. Give it a try! I believe the Orc campaign uses it.

sanslash332 commented 10 years ago

Sorry is a my mistake. I was want to say rules.txt instead styles.txt

If you can define rules.txt for each map in each campaign.

From: Craig Brett Sent: Monday, August 18, 2014 2:10 PM To: soundmud/soundrts Cc: Sandl Okino Subject: Re: [soundrts] Have a campaign extend from a mod (#11)

sanslash332 said:

"how works the game when a map have its own styles.txt? As the jl4 map.

For example, if a map in its styles.txt defines a complex mod, like crazymod. The map will work properly?"

This is for campaigns, not multiplayer maps. And they can already have their own rules.txt and ui stuff. We can't currently "define a mod" in styles.txt, so that won't be an issue.

sanslash332 said:

"And if the styles.txt requires some external files such a lot of sound files and you try play with it with a person that doesn't has these files. The map can load?"

yes, it can. It just won't play those sounds. Ideally we shouldn't be getting in scenarios where someone has a mod and a campaign that uses it but not those sounds, unless they've been manually deleting them.

sanslash332 said:

"And why not implement this for the campaigns?

For example, you can define a styles.txt for each campaign, and, you can define another styles.txt for each chapter for each campaign. In the case if a particular chapter needs add more elements to the default styles.txt of the campaign."

This is already possible. Give it a try! I believe the Orc campaign uses it.

— Reply to this email directly or view it on GitHub.

craigbrett17 commented 10 years ago

Oh ok, yes I believe you can

soundmud commented 10 years ago

If I remember correctly, the current limitations are:

  1. The chapters of the same campaign will share the rules and style of the campaign. No chapter can have specific rules or style. It wasn't implemented because the code about mods was already complicated enough and not completely clean, and the need wasn't obvious at that point. At the moment, for the sake of simplicity, chapter-specific units are defined and shared at the campaign level.
  2. Although a multiplayer map can define its own rules and style (at least I hope so), it will be sent through the network by the server. As a consequence it shouldn't be too heavy (lots of sounds).