Artifacts

I was rummaging through the RESEARCHSUBJECT files for the artifacts, and I was thinking about creating a new one. It would be easy to make new strings and gameplay constants for them, but how do you define what they do? I can't find any indication of what the Base and Delta arguments are sent to. Example:

artifactHullRepairOverTimeIncreasePercent
ResearchSubject "RESEARCHSUBJECT_ARTIFACT_HULLREPAIROVERTIMEINCREASE"
Base 0.0 <--
Delta 0.050000 <-- Where do these go?
Has anyone found how to define what is multiplied by Delta? I can't find any variables such as "Hull Strength" or anything, and the artifact's RESEARCHSUBJECT files do not seem to define anything but cost, name, description, and time to research.
5,303 views 5 replies
Reply #1 Top
I'm not a hundred percent sure, but normaly they're defined in the PlayerTech.entity file and the Gameplay.constants file:

artifactHullRepairOverTimeIncreasePercent
ResearchSubject "RESEARCHSUBJECT_ARTIFACT_HULLREPAIROVERTIMEINCREASE"
Base 0.0
Delta 0.050000

Altough afaik artifacts are a special case.

Prerequisites
NumResearchPrerequisites 0
ArtifactPlanetBonus "ArtifactHullRepairOverTime"
BaseUpgradeTime 75.000000
PerLevelUpgradeTime 15.000000

I think the bold line above defines the function of the artifact. They seem to work in a special way.

So, afaik they're hardcoded and you can't add more artifact types.

But I hope I'm wrong about that, would suck a bit if it were so.
Reply #2 Top
There is a file labeled "RESEARCHSUBJECT_ARTIFACT_HULLREPAIROVERTIMEINCREASE.entity"... does that help?
Reply #3 Top
I've been looking at that as well Ron Lugge. It is the file I spoke of in the OP. I wonder if you can name something like, "RESEARCHSUBJECT_ARTIFACT_SHIELDREPAIROVERTIMEINCREASE" and add the strings and all and that would work? I wonder if the name has something to do with the variable it affects.
Reply #4 Top

I've been looking at that as well Ron Lugge. It is the file I spoke of in the OP. I wonder if you can name something like, "RESEARCHSUBJECT_ARTIFACT_SHIELDREPAIROVERTIMEINCREASE" and add the strings and all and that would work? I wonder if the name has something to do with the variable it affects.


Oh, oops.
Reply #5 Top
The effect is determined by the first header line, not the ResearchSubject line. The way to read this entity is as follows:

artifactHullRepairOverTimeIncreasePercent
# Increase HullRepairOverTime
ResearchSubject "RESEARCHSUBJECT_ARTIFACT_HULLREPAIROVERTIMEINCREASE"
# The amount of increase is determined by the amount of research done on this subject
Base 0.0
# At level 0 of research (no research done), the "base" improvement is 0%
Delta 0.050000
# For each level above 0, the improvement increases by 5%

So in other word, level 1 is a 5% increase, level 2 is a 10% increase, etc., up to the limit of how much RESEARCHSUBJECT_ARTIFACT_HULLREPAIROVERTIMEINCREASE can be researched.

Nothing you can do here affects what ship stat is changed. The "artifactHullRepairOverTimeIncreasePercent" associates everything under it with hull repair rate.

Normal research works similarly. Those entries are in the PlayerRace.entity files.