Logo Platform
logo amplifiers simplified

Where is my error?

Copied to clipboard!
12 years ago
Mar 31, 2013, 1:55:56 AM
I have had a few crashes on a mod I am working on I suspect it maybe due to some modifications to bigger hulls having a multiplier for engines (as in battleships the engines weigh 4x):



Here is the error message in the output_log:



[CODE][AI_System] OrderCancelConstructionAt



(Filename: C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 43)

[/CODE]
0Send private message
12 years ago
Mar 31, 2013, 2:19:22 AM
Well, we would need to actually see the code, not the logs. I can tell from experience modding this game that the logs rarely offer a serious clue about what went wrong.
0Send private message
12 years ago
Mar 31, 2013, 2:48:42 AM
Foraven wrote:
Well, we would need to actually see the code, not the logs. I can tell from experience modding this game that the logs rarely offer a serious clue about what went wrong.


Foraven, Did you mod in Distant Worlds or Star Ruler as I recall your name being associated with major mod.

Here would be some possible code: First from ShipDescripter:

[CODE]























































































[/CODE]



Then she AI ship templates from ImperiumAeterna that I didn't mess with:

[CODE]

















































































































[/CODE]



As you can tell my coding skills consist of looking at other's mods and trying to tweak them into something else.
0Send private message
12 years ago
Mar 31, 2013, 3:55:10 AM
tirane wrote:
Foraven, Did you mod in Distant Worlds or Star Ruler as I recall your name being associated with major mod.




Yes, i did mod for other 4x before, like Star Ruler (Not Distant World though). But i'm only modding Endless Space currently.



Well, i checked your code and quickly found what seem to be the bug:











I guess you are trying to reduce the effectiveness of defense depending on the number of defense on board. But due to how this game work i think this is the cause of the bug. You should refrain from doing equations on things that will be displayed in tool tips. If you want to remove a percent of a value, you should use addition rather than multiplication (ie you add the result of the equation to the target property, multiplying it will mess things up).



One way you can use to figure out where your crash bug is (in the future) is to try to run the mod while removing files one by one; if the mod run and don't crash the game with a certain file out, you found where the error is. Then you just have to figure out what part of the code is buggy. I hope i explained this well enough.





As you can tell my coding skills consist of looking at other's mods and trying to tweak them into something else.




I often look at what others have done, but generally i learn a lot more (and fix a lot of mistakes) trying things out on my own.
0Send private message
12 years ago
Apr 3, 2013, 2:51:41 PM
I think it is now working (I hope) despite no changes.



My intention was to make bigger ships (less agile) easier to hit but instead I modified the defenses on them. Likewise the smaller ships (more agile) are harder to hit especially for missles.



Now I am having a problem getting my mod to load files I had created:

[CODE]









Evil Tactician, Tiax, Tirane

http://www.manapool.co.uk/endless-space-imperium-aeterna-mod/

2012-11-30





v1.0.0 Initial Release

For a full description of EvilTactician's Imperium Aeterna and Tiaximus' Planet Expansion and Anomaly Overhaul mods, please visit: /#/endless-space/forum/37-modding/thread/16327-mod-shopping-mall






This mod attempts to recreate the universe of the Uplift Wars by David Brin.It uses more recent data than that contained in the Terragen Field Agent Handbook.

As I am not a programmer it builds on the shoulder's of EvilTactician and Tiaximus using their mods.

Anomaly Color Guide:

Red: No current benefits, all effects are negative.

Orange: Negative effects and positive effects.

Green: All effects are beneficial.

White: No effect until appropriate reduction is applied (should one exist).

Purple: Highest-tier reduction, cannot be further reduced.







General



CustomIcons/Jophur.jpg

CustomIcons/neodolphin.jpg



%ModName

%ModDescription













Simulation/TiaxAnomaly.xml





Simulation/NewTerraformation.xml

Simulation/StarSystemOrbital.xml

Simulation/TiaxPlanetImprovement.xml

Simulation/UpLStarSystemImprovement.xml





Simulation/Hull.xml

Simulation/IADefenseModule.xml

Simulation/NewTerraformation.xml

Simulation/PlanetImprovement.xml

Simulation/StarSystemOrbital.xml

Simulation/IAWeaponModule.xml

Simulation/TiaxPlanetImprovement.xml





Simulation/Hull.xml





Simulation/IAWeaponModule.xml

Simulation/IADefenseModule.xml





Simulation/ShipDesign.xml





AI/ShipDesignTemplate.xml





Simulation/StarSystemOrbitalDescriptor.xml

Simulation/TiaxPlanetDescriptor.xml

Simulation/IAEngineModules.xml

Simulation/ShipDescriptor.xml

Simulation/UpLStarSystemImprovementDescriptor.xml





Simulation/TechnologyExpansion.xml

Simulation/TiaxTechnologyDiplomacy.xml

Simulation/TiaxTechnologySciences.xml

Simulation/TechnologyOrbital.xml

Simulation/TechnologyWarfare.xml









[/CODE]



With my file named UpLStarSystemImprovementDescriptor:

[CODE]









































[/CODE]



and my file: UpLStarSystemImprovement

[CODE]












TIAXPlanetExpansion3

$(ClassStarSystem/PlanetTypeArid) or $(ClassStarSystem/PlanetTypeDesert) or $(ClassStarSystem/PlanetTypeLava) or $(ClassStarSystem/PlanetTypeBarren) or $(ClassStarSystem/PlanetTypeTundra) or $(ClassStarSystem/PlanetTypeAsteroids) or $(ClassStarSystem/PlanetTypeGasHydrogen) or $(ClassStarSystem/PlanetTypeGasHelium) or $(ClassStarSystem/PlanetTypeGasMethane)

$(ClassStarSystem/PlanetTypeArid) or $(ClassStarSystem/PlanetTypeDesert) or $(ClassStarSystem/PlanetTypeLava) or $(ClassStarSystem/PlanetTypeBarren) or $(ClassStarSystem/PlanetTypeTundra) or $(ClassStarSystem/PlanetTypeAsteroids) or $(ClassStarSystem/PlanetTypeGasHydrogen) or $(ClassStarSystem/PlanetTypeGasHelium) or $(ClassStarSystem/PlanetTypeGasMethane)

$(ClassStarSystem/PlanetTypeArid,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeDesert,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeLava,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeBarren,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeTundra,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeAsteroids,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeGasHydrogen,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeGasHelium,PlanetStatusColonized) or $(ClassStarSystem/PlanetTypeGasMethane,PlanetStatusColonized)



%TIAXPlanetExpansion3Title

%TIAXPlanetExpansion3Description













[/CODE]
0Send private message
12 years ago
Apr 3, 2013, 3:30:32 PM
I think I know what you did wrong.

The weigthing for any module on a ship can be either a positive value or -1.

-1 is interpreted as exactly 1.

Any positive value is interpreted as a weigting to the other values for the rest that is not already filled with modules where you put exactly one on.

Something like -0.25 makes no sense in this regard.



Edit: The file-loading is pretty nasty. Sometimes it works as you would suppose, sometimes it doesn't.

I mostly sticked with the original filenames to avoid such troubles. But not sure if it really is, what's causing the problem.
0Send private message
12 years ago
Apr 3, 2013, 5:49:35 PM
Ail wrote:
Any positive value is interpreted as a weigting to the other values for the rest that is not already filled with modules where you put exactly one on.

Something like -0.25 makes no sense in this regard.




Darn, while i knew that i forgot to tell him about it.
0Send private message
12 years ago
Apr 3, 2013, 6:24:01 PM
Ail wrote:
I think I know what you did wrong.

The weigthing for any module on a ship can be either a positive value or -1.

-1 is interpreted as exactly 1.

Any positive value is interpreted as a weigting to the other values for the rest that is not already filled with modules where you put exactly one on.

Something like -0.25 makes no sense in this regard.



Edit: The file-loading is pretty nasty. Sometimes it works as you would suppose, sometimes it doesn't.

I mostly sticked with the original filenames to avoid such troubles. But not sure if it really is, what's causing the problem.




I think not as these are from the original files:



[CODE]



























[/CODE]
0Send private message
12 years ago
Apr 3, 2013, 7:13:03 PM
tirane wrote:
I think not as these are from the original files:



[CODE]



























[/CODE]




What Ail speak about if if you set a -0.25 in the ship design template, the ones you see there in the hull.xml reduce the weight of said modules (ie that they take less space, not the same as weighting in templates that adjust the ratios of modules the AI will put on the ship).
0Send private message
12 years ago
Apr 4, 2013, 12:17:34 AM
Foraven wrote:
What Ail speak about if if you set a -0.25 in the ship design template, the ones you see there in the hull.xml reduce the weight of said modules (ie that they take less space, not the same as weighting in templates that adjust the ratios of modules the AI will put on the ship).




That was my intention.



I am going nuts trying to get my code to not be over ruled by the vanilla. I think I will download your mod to see how it is done.
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message