Page 1 of 1

where is "hostile environment cost"?

Posted: Sat Oct 06, 2018 6:45 am
by akkamaddi
Hi,
Quick question: Where is the hostile environment cost handled in the code? And is it based on the habitability settings of the races, or does it have to be set?

Thank you.

edit: I've tried setting up visual studio, but I'm getting an error that VS is not set up to receive hints, and VS crashes. :? Sorry.

Re: where is "hostile environment cost"?

Posted: Mon Nov 05, 2018 4:42 pm
by harpy eagle
Look for "function PlanetProperty.hostile_env_cost(planet)" in Orders/coin_production.lua

Re: where is "hostile environment cost"?

Posted: Mon Nov 05, 2018 9:38 pm
by AMX
akkamaddi wrote:edit: I've tried setting up visual studio, but I'm getting an error that VS is not set up to receive hints, and VS crashes. :? Sorry.

I couldn't get Visual Studio to work properly either - I think I got past this problem, but then I ran into another crash and gave up.

Sven added support for VSCode to the beta, that looks more promising.

Re: where is "hostile environment cost"?

Posted: Tue Nov 06, 2018 6:06 am
by harpy eagle
If VS is giving you trouble, you don't actually need to use an IDE. I just use a text editor, myself.

Of course, you won't be able to use step-through debugging, but most of the time I think you can get by without it (not always though).

Re: where is "hostile environment cost"?

Posted: Wed Nov 07, 2018 7:08 am
by akkamaddi
harpy eagle wrote:Look for "function PlanetProperty.hostile_env_cost(planet)" in Orders/coin_production.lua


Awesome! Thank you! :D