Helping a Novice: Modding this possible?

Hello all. I have never modded anything before in any game; I'm a bit of a computer idiot and things like code or XML is incomprehensible to me. Changing those hidden-by-default files makes me nervous. I am afraid I would break the game. Nevertheless, I was wondering if I would give modding a try, because I like this game so much and I basically just want to change two things. I have no idea if that is even possible. I hoped to be able to ask here and see what you smart people say.

Basically, I wanted to try to make a "mod" that changes only 2 things. Thing 1: Music. Thing 2: Pirates. I like everything else in the game, or rather I am pretty sure that any other changes I would want I would never be able to mod.

Thing 1: What keeps me from turning off the game music (which I find decent) like I do with almost any other strategy game after a couple of days of play is the way the music switches from "peaceful" to "battle". I like that. It's what keeps me having the music turned on. But I'd like to make it more variable. I'd like to have it modded so that the peaceful music would be either an .mp3 that I have or, ideally, randomly picked from a pool of .mp3s that I would designate (thinking primarily of Amon Tobin here, if that means anything to anyone). I would like to have the battle music be "The Imperial March" (from Star Wars), which I also have as .mp3. Would that be hard to do?

Thing 2: I really love the *idea* of the pirates in trinity, but they are just so hard for me right now. Can I make a mod to tone them down a bit? (I mean: Making the default attack size 50% of its current size? Maybe even making the default pirate base 50% smaller? But that might not be necessary. I have no problems with the base in the games I play (in which I turn off pirates), I simply never enter that system.)

If you wise people say that either Thing 1 or Thing 2 or both are possible, I was kind of hoping to ask anyone if they would be so kind as to help me to get started on this, even up to the point of "holding hands" on a few steps. I am not sure what I could offer in the way of renumeration, but I would be sure to pass the knowledge on. A private message would also be greatly appreciated. Thank you very much in advance and best to you.

22,754 views 25 replies
Reply #1 Top

We have a great community here and I am sure people will help you out.

Music is probably the easiest thing to start modding in sins. First thing you will need is the current set of reference files. All you need is notepad to edit them but I recommend notepad++.

 

Original Sins 1.191 Entrenchment 1.051 Diplomacy 1.011

Which ever game you want to mod is the set you need. Then you will have to make your new mod folders and files. You can take a look at http://soase.weebly.com/placing-mods.html to get an idea where to start. Once in the proper mod directory, create a folder. This folder name will be the name of the mod you enable in-game. Inside that folder, create another folder call Sound (case sensitive). This is where it looks for the music and sounds. Also in the mod folder, create another folder called GameInfo (case sensitive). This is where you will copy from the the reference files all the files you need to edit with notepad.

Start with the player entities.

  • PlayerPhase.entity
  • PlayerPsi.entity
  • PlayerTech.entity

Each of these holds the references to the music each race uses. Here is the section for TEC about half way down.

musicThemeData
 musicThemeCount 7
 musicTheme "MUSIC_TEC_THEME_1"
 musicTheme "MUSIC_TEC_QUIET_1"
 musicTheme "MUSIC_TEC_MISC_1"
 musicTheme "MUSIC_TEC_MISC_2"
 musicTheme "MUSIC_BATTLE_7"
 musicTheme "MUSIC_BATTLE_13"
 musicTheme "MUSIC_TROUBLE_4"
 scareThemeCount 2
 musicTheme "MUSIC_BATTLE_7"
 musicTheme "MUSIC_BATTLE_13"
 announcementCount 1
 musicTheme "MUSIC_TEC_ANNOUNCEMENT"

Notice  the counts. Each time you add something it always has a count that needs to be updated. All of those references link to SoundMusic.sounddata and Game.musicdata also in the GameInfo reference files. Copy this to your new mods GameInfo directory.

All music in sins is ogg format but if you use a different format it will require the extention like .mp3. Sample of SoundMusic.sounddata...

music
 name "MUSIC_BATTLE_1"
 fileName "Battle 1.ogg"
 isLooping FALSE
 actionLevel 0.75
 actionRange 0.35
 emotionLevel 0.0
 emotionRange 1.0
  
I would just copy a section like that for all my battle tracks and change the name and fileName and update the count. Do the same for the quiet tracks.

Game.musicdata I think holds tracks shared for all players. Notice how the MUSIC_BATTLE_1 above is not listed in the TECs list but it will play randomly in battles. So if you want it shared by all players put it in here and not the player entity.

Familiarize yourself with these files a post back specific questions then we will get you on the pirates which is a little more advanced.

I put together the soase.weebly.com for new modders which is a collection of great threads and stuff I added.

Also

enum { MAX_SOUNDDATA = 2000 };


Reply #2 Top

Thing one: Yes, this is possible if I have understood you right. What you want is to expand the battlethemes with these 2 tracks right? If so then it is quite easy. You will need to convert the mp3 files to ogg files (use google to find a free tool).

Thing two: This is quite easy (both things) if you know how to do it xD.

So lets get started, first you will need to go to the folder with all of the mods. Go to your user folder and add this to the path: \AppData\Local\Ironclad Games\Sins of a Solar Empire

Now you're in the sins folder in this folder there should be multiple mod folders among other kind of folders, the one you will need to enter is the Mods-Diplomacy v1.011 folder (might have an other name in trinity, not sure). Here you make a new folder (right click -> new -> folder) and give it the name you want to use as the mod name. Inside this folder you create 2 new folders, GameInfo and Sound.

You put over your ogg files in the Sound folder.

Extract these files to the GameInfo folder: http://www.mediafire.com/?o4gip95c9093s60

You need to edit the SoundMusic.sounddata to add the two tracks, just copy some existing battlethemes in the file and change the file name, sound name and add 2 to the count at the top of the file, in order for the game to actually use the files you can either add them to the Game.musicdata file (will play for all races) or one/some of the playerrace.entity files (Phase is vasari, Tech is TEC and Psi is advent).

You can edit the fleet size of the pirate raids in the Gameplay.constants file and change the size of their base in the GalaxyScenarioDef.galaxyScenarioDef file (they are pretty big so you will have to scroll a lot).

I hope this helped, and if you have further questions just ask :D

Edit: oh, I see that mysfist was faster then me >_<

Reply #3 Top

WOW thank you so much for these fantastic and fantastically quick replies!! THank you thank you thank you

Since I will not get a chance to attempt to get my hands dirty with this until tomorrow, I would like to take the opportunity to ask just some questions based off these posts before I start. Let me say that I printed this out and read it a couple of times, and am still not entirely sure on all points; I'm still kind of afraid that I will screw something up and break the game. So here are my questions just based on your kind posts, before I start:

1. I already have one mod in that fold, the Sins Optimization Project. I can add my new folder to Mods without conflict, right?

2. When I make the new mod for music, I will only be modding the music, so the mod will only contain a subfolder called Sound, right?

3. MyFist seems to say I need to change each of the player's entries, while GruntMaster says I can do it globally -- if I understand correctly. If I do, then doing it globally would be 1/3rd the amount of work (and 1/3rd the risk of screwing up) - right? I didn't understand much of the rest of what Gruntmaster said, it was too quick for me. I really need the step-by-step way MyFist kindly wrote.

4. MyFist says "Start with the player entries": does that mean in the files I found in the Reference Files for Trinity (Diplomacy)?

5. MyFist says "Notice  the counts. Each time you add something it always has a count that needs to be updated." Do I need to understand what that means?

6. MyFist says "All of those references link to SoundMusic.sounddata and Game.musicdata also in the GameInfo reference files. Copy this to your new mods GameInfo directory." What do you mean with "this"?

7. MyFist says "I would just copy a section like that for all my battle tracks and change the name and fileName and update the count." I think I understand that I put MY new .oggs in where the OLD .oggs were, and then I should write instead of Battle 1 something like MyNewBattle 1 -- but how do I "update" the "count"?

8. It seems there are more music tracks than I thought. I thought it was only 2 (peaceful and battle), but looking at what you copied MyFist, there is a whole bunch (theme, quiet, battle at least till 13, misc, announcement, and trouble. I'm not sure which of those I should change, since I really only had the idea to change "battle" to the imperial march (darth vader's theme), but apparently there is a whole bunch. You say "copy a section like that for all my battle tracks" and "the same for all the quiet tracks" -- I'm not sure what you mean exactly. How do I know which files are which, and how many there are, and what exactly do I have to replace except for the filename?

9. Sadly, I did not understand what to do regarding what Gruntmaster wrote about the pirates.

I will followed your advice and read more on soase weebly, I'm just afraid that I only understand about 20% of the stuff you write. I believe I'm not the least intelligent person in the universe, but I am exceptionally unexperienced with computers and I don't know most of the terms. This is not meant as a slight to your website, I just think that what you have created is meant primarily for a different target group (people who know computers or who have modded something before) and you take too much for granted for me. I read the "learn the basics" page and was baffled.

THANK YOU SO MUCH FOR YOUR HELP

EDIT: I found the "sound" section on your site and am grateful for the links

 

Reply #4 Top

1. Yes. With Entrenchment and Diplomacy you can actually stack multiple mods that dont conflict. Yours will not so just have your mod on top of TSOP. You can have an unlimited amount of separate mods in the mod folder, it is just which you choose to enable in-game.

2. No. It still requires you add the music track 1st to SoundMusic.sounddata and then to either the Game.musicdata or the player.entity. All of these are in the GameInfo sub folder.

3. Globally is fine.

4. All the files that I listed are in the Reference Files GameInfo folder. Copy these to the new mods GameInfo folder. If you are going to add them all globally you do not need the player.entities, just the SoundMusic.sounddata and Game.musicdata

5. Counts are most IMPORTANT. Every file I have said to modify will have a count, eg musicThemeCount 7. The counts MUST be updated. The Game.musicdata and SoundMusic.sounddata counts are at the very top of the file

 

Reply #5 Top

THIS POS FORUM IS CUTTING MY POST

6. Each line in either the Game.musicdata or the player.entity links to SoundMusic.sounddata which links to the Sound folder. 

7. Count for SoundMusic.sounddata is at the top of the file.

numMusic 74


8. If the track you want to add is upbeat and you want it played with the other upbeats then by all means copy that section and change the name and fileName. However the new track best fits in-game use that section as a template.

Sound 1st then Pirates   :thumbsup:

 

 

 

 

 

 

+1 Loading…
Reply #6 Top

OK thank you tons! Really, thanks a lot for your patience and help. Wish I were a bit quicker on the uptake. But I am underway. This is what I did so far.

- DLed and installed Audacity and converted 5 .mp3 files to .ogg. (This program will not convert mp4 to .ogg properly)

- Created folder "My Music Mod" in the right place (in Mods Diplomacy 1.011, next to Sins Optimization); created subfolder GameInfo and created Subfolder Sound; but the 5 .ogg files into Sound.

- DLed the big zip of SoSE_Dip_1.011, unzipped it, found GameInfo, did a search, found SoundMusic.gamedata and copied this (and only this) into the GameInfo folder of My Music Mod

- opened that file (SoundMusic) with wordpad

Q: RIGHT SO FAR? DID I FORGET SOMETHING / DO SOMETHING WRONG SO FAR?

Now I'm stuck, or rather, I'm apprehensive about what to do. There are 2 things I do not entirely understand now.

Confusing Thing 1: There are tons of entries in this file. Let me try to make sub-questions.

1a: There is not one track labeled "Battle Music", but rather many; I counted 14 that read "MUSIC_BATTLE_1" to "MUSIC_BATTLE_14". Am I supposed to edit all of them or only 1? I only have 1 suitable track at the moment (darth vader's theme). Am I supposed to find 14 tracks, convert them, and copy them? Or Do I only do Music-Battle-1?

1b: There are ALSO listings for the various races. Do I change the battle music for each race too, or is it so that if I change the music in the settings which are not listed for the races that this will override the settings in the races?

1c: Obviously my ear isn't good enough. I was aware of peaceful music and battle music in game, but the game obviously differentiates more subtly, there are lots of different types (quiet, sad, trouble, announcement). If possible, I would like the tracks I selected to not switch around all the time in the middle, but I am unsure if I should merely put all of them (except vader) under quiet 1 to quiet 4. I think I should do that but just want to check with you if you know what sad, trouble, and announcement means.

Confusing Things 2: You keep saying update the count. I still do not know how to do that. I do not know what you mean when you say "update". The most confusing thing is that in this file, there is no entry for "count" (I searched via wordpad and came up blank). Did I do the wrong file or forget something?

THANK YOU SO MUCH FOR YOUR PATIENCE AND HELP.

PS. The "GameInfo" part of my so-called mod so far is only 12kb large. Can I send this to you per email or something to take a look if I did something wrong? Thanks so much

EDIT: To rephrase question 1 maybe better: If I only replace Battle-1 and Quiet 1 through 5, will the game play my battle-1 in 1/14th of the battles? Must I then delete battle 2-14 if I wish it otherwise? I am also surprised, because I never noticed so much variety

Reply #7 Top

Fist off, don't use wordpad. Wordpads editing has weird effects on the files, use notepad.

All the music that is not changed you do not edit. I thought you wanted to add to the playlist? If you just want to replace a track or 2 then no need to edit any files in the GameInfo folder, just rename the track you converted to and existing track name and it will play in its place.

If you want to add a track the COPY a section of the type of music it is and past it in the same file adding the lines. For each track added add +1 to the count.

Here is the first couple tracks from SoundMusic.sounddata

TXT
numMusic 74    <--- ToTal Count add here +the number of tracks added
music    <---- count 1
name "MUSIC_FRONTEND"
fileName "TEC 3.ogg"
isLooping FALSE
actionLevel 0.5
actionRange 0.5
emotionLevel 0.0
emotionRange 1.0
music    <---- count 2
name "MUSIC_BATTLE_1"
fileName "Battle 1.ogg"
isLooping FALSE
actionLevel 0.75
actionRange 0.35
emotionLevel 0.0
emotionRange 1.0
music    <---- count 3 and so on
name "MUSIC_BATTLE_2"
fileName "Battle 2.ogg"
isLooping FALSE
actionLevel 0.75
actionRange 0.35
emotionLevel 0.0
emotionRange 1.0

After I copied a section and pasted it in an modified the new section..

TXT
numMusic 75   <--- count, added +1
music    <---- pasted these 8 bolded lines for battle song
name "STORMTROOPERS"
fileName "Stormtroopres.ogg"
isLooping FALSE
actionLevel 0.75
actionRange 0.35
emotionLevel 0.0
emotionRange 1.0
music
name "MUSIC_FRONTEND"
fileName "TEC 3.ogg"
isLooping FALSE
actionLevel 0.5
actionRange 0.5
emotionLevel 0.0
emotionRange 1.0
music    <--- copied these 8 bolded lines for battle song
name "MUSIC_BATTLE_1"
fileName "Battle 1.ogg"
isLooping FALSE
actionLevel 0.75
actionRange 0.35
emotionLevel 0.0
emotionRange 1.0
music
name "MUSIC_BATTLE_2"
fileName "Battle 2.ogg"
isLooping FALSE
actionLevel 0.75
actionRange 0.35
emotionLevel 0.0
emotionRange 1.0

Now if you want this to play for all races add STORMTROOPERS to Game.musicdata like so. This is just the first couple agian.

TXT
musicThemeCount 35   <--- count, added +1
musicTheme "STORMTROOPERS"
musicTheme "MUSIC_QUIET_1"
musicTheme "MUSIC_QUIET_1"
musicTheme "MUSIC_QUIET_2"
musicTheme "MUSIC_QUIET_4"
  
If not for all races, lets say you want it for TEC only in PlayerTech.entity.

musicThemeData
 musicThemeCount 8   <--- count, added +1
 musicTheme "STORMTROOPERS"
 musicTheme "MUSIC_TEC_THEME_1"
 musicTheme "MUSIC_TEC_QUIET_1"
 musicTheme "MUSIC_TEC_MISC_1"
 musicTheme "MUSIC_TEC_MISC_2"
 musicTheme "MUSIC_BATTLE_7"
 musicTheme "MUSIC_BATTLE_13"
 musicTheme "MUSIC_TROUBLE_4"
 scareThemeCount 2
 musicTheme "MUSIC_BATTLE_7"
 musicTheme "MUSIC_BATTLE_13"
 announcementCount 1
 musicTheme "MUSIC_TEC_ANNOUNCEMENT"

If you want to know when  scareThemes or announcement or any others are used then play the tracks with winamp. They are in the TSOP mod Sound folder or the originals are in

C:\Program Files\Stardock\Sins of a Solar Empire\Sound or the add-ons have a couple changes in

C:\Program Files\Stardock\Sins of a Solar Empire\Entrenchment\Sound and

C:\Program Files\Stardock\Sins of a Solar Empire\Diplomacy\Sound

then play a game and listen for when the tracks are played.

 Do not add the yellow parts, there from the dog.  :puke:

Sure, email me at myfist0 at hotmail dot com. Thats a zero on me name. and I need the track names you added to the sound folder.

Reply #8 Top

Thank you. I think I understand a lot better now. Thanks!

I DLed Notepad++ and used that. I edited five sections of SoundMusic like this music
 name "MUSIC_BATTLE_1"
 fileName "Darth Vader.ogg"
 isLooping FALSE
 actionLevel 0.75
 actionRange 0.35
 emotionLevel 0.0
 emotionRange 1.0

music
 name "MUSIC_QUIET_1"
 fileName "Paris Streatham.ogg"
 isLooping FALSE
 actionLevel 0.15
 actionRange 0.15
 emotionLevel 0.4
 emotionRange 0.6

so that, IUUC, one battle song should be darth vader and 4 quiet songs should be those of my choosing and saved it in the Mod folder. I think this way I "replaced" five tracks. Right?

Then I enabled the mod and used "apply changes".

I let the game run for about an hour, but I have not noticed any of the music in my mod play. The game doesnt crash, but neither do I notice a difference. Have I missed a step? I doublechecked to make sure I typed the names of the songs right ;.) (in your example above you typed "stormtroopres" incorrectly heheh)

thank you for your help!!!

Reply #9 Top

1 Are you adding to the playlist or replacing?

2 I stated already that if you are replacing the easiest way is to name Darth Vader.ogg to Battle 1.ogg and no need to edit any text files at all. Delete the gameinfo folder and rename the tracks.

email me the file

Reply #10 Top

I'm trying to replace. I'm afraid I don't entirely understand what you mean by point 2. I thought that was what I was doing. I don't see how I can do that without the gameinfo folder, in which the SoundMusic datafile is. I will email you the file. Thanks so much.

Reply #11 Top

Directory Structure from the weebbly

The 2 expansion packs are basically mods installed to the SoaSE root directory.

 

The game starts in the highest mod working its way down to the base game.

 

Lets use an example of 3 stacked mods in Diplomacy, each containing a different version of the KOL capital ship. The game loads all the files from the highest stacked mod first, this is the KOL used by the game. Then checks the mod below that for any missing files needed to play Diplomacy, the Kol here will not be used because it is already loaded. Then the lowest mod, again checking for any files not loaded by the first 2 mods. Now it checks the games Diplomacy then Entrenchment then Original SoaSE files.

 

The original game files are last and will only load any files needed but not found in the higher mods.

 

So remember that if there are multiple enabled (stacked) mods, the files in the one on the top will override files in the mods below or game files.

 

Original SoaSE does not allow stacking mods. Original SoaSE mods will only check the Original SoaSE game files for missing components.

 

Reply #12 Top

Thank you. I'm not sure what I am doing wrong, and if or how what you wrote above applies to my situation.

Reply #13 Top

onomastikon, a translation of what myfist0 said is

in the enabled mods in entrenchment/diplomacy  the game looks for the files it needs starting in the TOP of the enabled mods list, then in the next down and so on until it runs out of enabled mods,

then it looks in the diplomacy(if running diplomacy),

then entrenchment,

and lastly the vanilla sins game folders UNTIL it finds the file it is looking for.

harpo

 

Reply #14 Top

Terribly sorry, I still cannot figure out what I'm doing wrong or what I should do to correct my mod. I feel I have it down: Put the .oggs in /Sound, changed the references of MUSIC_QUIET etc. to refer to the .oggs in the Sound file of GameInfo, and enabled the mod. Would you be so kind as to tell me the error of my ways? I didnt change the count, because the number of references in the file is still the same. Or must I change something in GameMusic.data as well?

Thank you very much!

Reply #15 Top

Not sure if your kind offer to help still stands, but if so, I hope I am not overstaying my welcome by trying to reformulate my questions. Since whatever I did in the GameInfo file didn't seem to work, I tried other things. Over the weekend, I hope I was understanding you correctly, because deleted the GameInfo file in my mod and opened the /Sound folder with the .oggs, and simply renamed *them* to Battle 1, Quiet 1 to Quiet 5, and saved, de-enabled the mod and then re-enabled it just to make sure. Still notice no change to the music. What am I doing wrong!?!?! I'd greatly appreciate your help.

(If modding the pirates is more difficult than this, I will probably leave that be then for the time being, since someone at Stardock said that there was a possibility that Pirates might be altered at some point...)

Thank you very much

Reply #16 Top

The file looked good and it seems yor doing everything correct so I am at a loss. Can you play the tracks? Send me 1 and I will test it.

Can you zip the mod and upload?

Reply #17 Top

Thank you very much. I will zip the mod and send it to you (is that what you mean with upload?) -- thank you!

PS. Zipped it -- it's 27MB, my mail program wont let me send it :-( do you know a workaround? The game info is tiny, I had already sent you that, it's the 6 sound files that make the size...

Reply #18 Top

Make an account on a free file hosting service like FileFactory, FileFront and megaUpload to name a few. Upload the archive and post the link to the DL page.

Reply #19 Top

OK thank you. I did that. Here is the link (filefactory). Thank you for your time and help!

Reply #20 Top

It works playing the music with the developer.exe. I tested quiet 5 and battle 1 and your songs played. It could be a long time before you hear a couple song changes, the game has a big list to pick from.

If you want to test an instant change in music change the top one like

music
 name "MUSIC_FRONTEND"
 fileName "Break charmer.ogg"
 isLooping FALSE
 actionLevel 0.5
 actionRange 0.5
 emotionLevel 0.0
 emotionRange 1.0

This is the games menu music and will play as soon as the mods enabled.

Make sure this mod is on top if stacking.

Reply #21 Top

I have probably played about 30 hours with the mod on and have never heard a single track of my mod.

Wait, are you saying I need to change the location of the mod ("on top"?) if I also have the Sins Optimization Mod running (the only other mod I have running)? Are you saying the mod is ok, but my placement of it is inhibiting it?

Reply #22 Top

Wait, are you saying I need to change the location of the mod ("on top"?) if I also have the Sins Optimization Mod running (the only other mod I have running)? Are you saying the mod is ok, but my placement of it is inhibiting it?

Yup

Use move up and apply changes

 

Reply #23 Top

THANK YOU! Will do!

(I still do not understand how your post from the weebbly applies here: I am not modifying the same ship 3 times, and the Sins Optimization Mod does not change the music, so why do I have to move it up?)

Reply #24 Top

(I still do not understand how your post from the weebbly applies here: I am not modifying the same ship 3 times, and the Sins Optimization Mod does not change the music, so why do I have to move it up?)

The version I downloaded of TSOP has modified Sound and *.soundData entries. If you want to add new sound files or modify existing ones they have to be on top of the TSOP to take effect otherwise the TSOP optimized sounds take precendence.

Reply #25 Top

I didnt realize that! I thought it just fixed graphics! Thank you