How to add New Research?

I'll keep this short and sweet as I'm just off. Has anyone added new research yet? If so, could you post a list of things you changed to get it to work. I will double check everything tomorrow that I have done, but so far, I've added the new research file, the icons for the buttons, the location of the buttons to be used (in the 'Window' folder), and added the strings needed. I have also changed the "Count" number at the top of all the nessacrary files.

Any help, though its probably too early in the modding stage to get a concrete answer, will be greatly appreciated.
14,077 views 18 replies
Reply #1 Top
Actually i added new researches for my mod. It's access to a ship.

Research window

First you need a research.entity file, that stores the research itself.
This is the research for the Diablo Class Escort Cruiser from Distan Stars MOD

RESEARCHSUBJECT_FRIGATEACCESS_ESCORTTECH.entity


TXT
entityType "ResearchSubject" [color="#008000"]> Type of the entity

hudIcon "HUDICON_RESEARCHSUBJECT_FRIGATEACCESS_UTILITY0TECH" > icon
smallHudIcon "HUDICON_RESEARCHSUBJECT_FRIGATEACCESS_UTILITY0TECH" > icon
infoCardIcon ""
NameStringID "IDS_RESEARCHSUBJECT_FRIGATEACCESS_ESCORTTECH_NAME" > Name of the research. Stored in english.str
DescriptionStringID "IDS_RESEARCHSUBJECT_FRIGATEACCESS_ESCORTTECH_DESCRIPTION" > Short description of the research. Stored in english.str
researchWindowLocation
block 2 > Which area got the research (0 is the top)
pos [ 5 , 0 ] > Place of the research ( Colomn, Line )
ResearchField "Combat" > Is it represented on a military or non military field.
Prerequisites
NumResearchPrerequisites 0 > is there are an other research(es) are needed to be available
MinimumArtifactLevel -1 > only for artifacts
BaseUpgradeTime 50.000000 > time for research
PerLevelUpgradeTime 10.000000 > Time increase for additional levels (added to the base time
BaseCost
credits 1250.000000
metal 300.000000
crystal 350.000000
PerLevelCostIncrease
credits 100.000000
metal 25.000000
crystal 25.000000
Tier 5 > The tier level of the research. Bigger means more advanced techs (as i see, this this determines to the program, how many labs are needed for the research)
onlyWorksIfTierLabsExist TRUE > Are labs needed for being researchable (the lab need is the same as the tier where you put the research
MaxNumResearchLevels 1 > Are there additional levels for further upgrade
priority 0.000000 > Determines the research priority
researchBoolModifiers 0 > Are the research made constant modifiers (Disable ability, Phase out, etc)
researchFloatModifiers 0 > Floating modifiers (used for multi level upgrades, such as weapon damage, population limits, etc)
artifactPicture "" > only for artifacts
[/color]

After this, you need to add the research for the race

Again, the diablo class (for Tec) PlayreTech.entity

researchInfo
count 104 [color="#808000"]> Determines how many researches the race have (if don't adjust, the mod could be activated, but takes more time)

entityDefName "RESEARCHSUBJECT_FRIGATEACCESS_UTILITY1TECH"
>>> entityDefName "RESEARCHSUBJECT_FRIGATEACCESS_ESCORTTECH" <<<
entityDefName "RESEARCHSUBJECT_HULLTECH0"
[/color]

Then you must point the research from the entity what the research unlocks


Prerequisites [color="#808000"]> is there requirments for build

NumResearchPrerequisites 1 > How many researches are required
ResearchPrerequisite
Subject "RESEARCHSUBJECT_FRIGATEACCESS_ESCORTTECH" > The required research
Level 1 > Which level of the research unlocks the ship[/color]

Unit stats

i hope this helps you a bit.
if you any questions, you can contact me via PM.
Reply #2 Top
Skyline got it. I've also modded in some research. The general idea is that you list a research prereq in your ability/module/ship entity file, then you create the researchsubject entity for it. Things like ship/module unlocks are pretty simple because the research itself doesn't do anything other than flag complete. Things for boolmodifiers and floatmodifiers can get a bit trickier.

A lot of things you can figure out by looking at similar researchsubjects the game already uses.

One other cool thing, when you create research dependancies, it automatically connects them with the arrows on the tree :P

As far as the research count in the player entity file, I forgot to update mine once and the game went completely haywire. The whole UI was off and the research screen was blank, eventually the game minidumped :)
Reply #3 Top
Skyline sir, you are a God among men. I cannot thank you enough. I had done all the above apart from the Player####.entity. I was searching for a file like that, which listed all the available research for an empire, I just didn't know where to look.

It was the 'Colonise *PlanetType*' which I was adding, and everything had fit in apart from the research showing up.

One other cool thing, when you create research dependancies, it automatically connects them with the arrows on the tree
End of quote


Thats also handy to know, I came across some references to arrows when looking for the elusive files, and wondered whether I would have to manually design and put them in. Thanks for the tip Annatar.

Once again, thanks for both of your replies, greatly appreciated. Oh, and one last thing, has a Modding Wiki been set up yet for Sins'? It would help a lot of people, me included. And any tricks, tips, and info we find while modding would have a place to be written down.

Reply #4 Top
Someone put up a Sins wiki, don't know if there's any modding stuff in there. A lot of folks I think are mostly waiting for the complete tools (whenever or whatever they may be :P), so far there seem to be fairly few people doing "big" modding changes, at least publicly :P
Reply #5 Top
Yeh, I'm sticking to the small mods at the moment, just adding one thing, or to one aspect of the game. It will be interesting to see just what exactly the finished Mods Tools will be capable of.
Reply #6 Top

Mmm, pure gold of info, thx for sharing this Skyline_HUN and Annatar11 ... and also to u - Uzii - for starting this goldmine tred :CONGRAT: 

I have thinking on this issue for some time and in due time I might want to extend tech-tree :)

Redion 
Reply #7 Top
Feel free to ask questions, Redion :P So far everything is going by trial and error since nothing's really documented. I've dabbled in adding a new race, new units, making new abilities (pretty fun, but can be a bit frustrating without knowing all the "type" parameters possible, and needing to dig around every existing file to try to find it.

Like, last night I was trying to make an ability that increases the same unit's damage and I completely forgot that the Rupture capital has a similar ability to increase damage of squadrons.

So I spent probably an hour and a half trying to go through a bunch of research and ability files and experimenting with the right buffEntityModifierType parameter, until Foogsie logged on IRC and pointed me at the Rupture's ability :x
Reply #8 Top

Ya thx m8 I prop will,

I know it can sometimes be quit frustrating lol.
Reply #9 Top
That Player****.entity is in the GameInfo Directory, wich you can find in this TEXT format in the modding tools under the folder ReferenceData
Annatar11... don't need to tell... i also want to figure out how to add an ability, that already in the game, just some of the values are different. In the current state, i spent most of the modding time with try to make the newly added researches/abilities/buffs workable.
The best tip i can give it to everybody is to CHECK EVERYTHING, than again, again, again...
The game engine is really sensitive. It can crash just because you used small character, instead of big.
Reply #10 Top
When editing the strings file one time I accidentally deleted the 's' from stringInfo in one line, so it read "tringInfo" and saved it.

That was the most hilarious game breaking I've done to date :LOL:

But yeah, it's pretty common for me to sit with a stack of 10-15 notepads open with various entity files  :SURPRISED: 
Reply #11 Top
Me too... just a week before, the most common thing on my desktop is a "nasty" picture from my girlfriend... Now only watches notepads and MiniDump windows. ;p
I'm afraid, the next time, when i meet my girlfriend i'll try to change her "attributes" or adding new "abilities" :HOT:
Reply #12 Top
it's pretty common for me to sit with a stack of 10-15 notepads open with various entity files
End of quote


I never go that mad. Once I had that many open, just changing one line on each, then closed the group and saved changes to all of them, was quicker. Generally I try to have a maximum of 3 or 4 open at a time.

And as for the one letter wrong problems, I've had more than my fair share with Medieval 2: Total War. Normal editing gives you a log which shows the exact location, to the line in a file, of the problem. But when editing texture file names and the more complex stuff, one letter can be your downfall. They need to introduce a readable minidump to Sins', so we (modders) can find the problem without sending off the file or restarting from scratch.

Reply #13 Top
But yeah, it's pretty common for me to sit with a stack of 10-15 notepads open with various entity files
End of quote


Wow lol, I stick with only two at a time - then I keep my errors down to a minimum :) I have tried with more but eventually I had to close all cus . . . wtf belongs to . . . u know – quit frustrating lol


Reply #14 Top
Me too... just a week before, the most common thing on my desktop is a "nasty" picture from my girlfriend... Now only watches notepads and MiniDump windows. I'm afraid, the next time, when i meet my girlfriend i'll try to change her "attributes" or adding new "abilities"
End of quote


Rofl !

Reply #15 Top
I have tried PM Blair Fraser, but it seems he is too busy :)

Hope instead one of you can help. I would like to know the following:

If I extending research levels for an item in research tree – example we have an item where we now can research 2 levels in Sins v1.02 and now I make it to 3 levels - will AI-players now take advances of this new level without I doing anything else than make this new level in tech-tree?

Redion
Reply #16 Top
Yes. The ai will develop that further levels too. The research priority is universal all levels in the certain research.
For example: i made Advant shield research 10 levels, +2.5%/level. Starting value 1350. The AI upgraded to 1620, which means the AI researched 8 levels from the 10.
Reply #17 Top
Yes. The ai will develop that further levels too. The research priority is universal all levels in the certain research.For example: i made Advant shield research 10 levels, +2.5%/level. Starting value 1350. The AI upgraded to 1620, which means the AI researched 8 levels from the 10.
End of quote


Great - thanks m8!

Also got a reply from Blair now, and he tells they should do it - so in all very good info :)

Redion

Reply #18 Top
Skyline, mind if I use this on the Wiki pointing to this thread?