• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Swizzlewizzle

First Lieutenant
7 Badges
May 6, 2016
214
49
  • Magicka
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
I haven't seen any effects or other that can allow me to write objects/values to console to check that things are working correctly... in Stellaris, how can this be done? Seems to be pretty difficult to do any sort of complex event scripting without the ability to write values out...

Does anyone know?
 
  • 1
Reactions:
Er Foraven, that is not what i'm asking. I'm saying, there should be a function to pass variable and object information to the console (or logs) so that we can see it later on and make sure our events are running correctly. I'm not seeing any functionality like that and was asking here if anyone knew of something.

Seriously, how are you ensuring that your events are outputting the correct numbers?
 
  • 1
Reactions:
Er Foraven, that is not what i'm asking. I'm saying, there should be a function to pass variable and object information to the console (or logs) so that we can see it later on and make sure our events are running correctly. I'm not seeing any functionality like that and was asking here if anyone knew of something.

Seriously, how are you ensuring that your events are outputting the correct numbers?

Well, i just saying that if that function exist, it's probably listed in there. I don't know how to do it either, it's a pain to test scripts when we have to guess if they work or not.
 
It would be really nice if we had a formal way to output variables/info to a log or the console in our scripts or even just an option that enables script debugging so that every line of script that's executed outputs all variables being evaluated (along with the result preferably) so we can more easily locate and correct issues.

It would also be really nice if we could reload scripts/events without having to reload the game every time we tweak them. Can't seem to get the reload console command to reload events from my mod.
 
Yea... I just don't understand why this functionality doesn't exist. Literally the base part of any language is the ability to output to a console/log to help with debugging and yet Pdox script language, having been used by modders for years, doesn't have something like that? What?
 
There's no good reason why it doesn't exist. I've added a trigger and an effect that has the same syntax:
Code:
log = "My log message. Something happened for [This.GetName]."
Which would print "[09:23:04][effect_impl.cpp:16662]: [2200.1.1] Log command triggered from effect in file: events/colony_events.txt line: 2283. My log message. Something happened for Earth." as an output to the game.log file. Do note that the game.log file is wiped every time you start the game.

I think most of the localisation functions should be available for the output.
 
  • 6
Reactions: