Home Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 2 users and 143 guests online.

Online users

  • GambitUK
  • Santiago

Languages

  • English English
  • French French

Browse archives

« August 2008  
Mo Tu We Th Fr Sa Su
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Home » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Is there a script debugger??

Submitted by pkoko on Wed, 2007-10-31 16:33. SE:V MODs

To those mod makers especially AI upgrade mods; Is there a script debugger that work with SE's script parser or compiler??

Another way to rephrase the question:
How do AI moders know that the computer executes their AI commands properly. How do they know the return value of a specific function in SE5?

‹ A new way to texture your shipsets! International speech files? ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Mod Designer

Re: Is there a script debugger??

Submitted by Gideon on Wed, 2007-10-31 16:36.

The compiler checks for errors automatically.

Aside from that, the only tools I know of for detecting what you are asking is through observing the AI in action.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod
or there:

» login or register to post comments
RogerN's picture

Re: Is there a script debugger??

Submitted by RogerN on Wed, 2007-10-31 16:40.

I think you can turn on logging and then add some output statements to your scripts. I've never tried it, however.

» login or register to post comments
Isopsyco's picture
Mod Designer

Re: Is there a script debugger??

Submitted by Isopsyco on Wed, 2007-10-31 17:45.

You can script in some commands to log events (variables, and such) to check where or when something should execute (or if it didn't). A memory dump of all the variables by name is what I use, it lest me know if they were initialized or not, if they got the right number at the right turn.

But other than that, you have to know your scripting code is set up logically. The parser will compile bad code (syntax aside), say, loop forever mess up will hang your game.

» login or register to post comments
Captain Kwok's picture
Mod Designer

Re: Is there a script debugger??

Submitted by Captain Kwok on Wed, 2007-10-31 18:11.

The file DebugSettings.txt in the data folder allows you to debug various things, including the execution of the various scripts.

Only the changing the DebugSettings.txt file in the default data folder will cause debug logs to be printed. To have logs made of the script execution, you'll want to set "Debug Section Script Evaluation Detailed := TRUE". This will create a big text file in the backup folder under the player name and turn number. It's a line by line print out of that AI's script being executed... these files get big fast as the number of game objects increase. The "simple" version is about half as much detail.

Below are the typical settings I use for debugging. If you look at my source AI scripts, you'll see I use the script function "Sys_Debug_Print" a lot to print out specific things about the AI in conjunction with setting "Debug Print Sections := TRUE". This produces a condensed log of only items I want to know each turn.

Generate Game Debug Log                                 := TRUE
Generate Engine Debug Log                               := FALSE
Use Fast Debug Log                                      := FALSE
Debug Section Engine Startup                            := FALSE
Debug Section Creation                                  := FALSE
Debug Section Sound Base                                := FALSE
Debug Section Display Class                             := FALSE
Debug Section Sobj Ship                                 := FALSE
Debug Section Display Object                            := FALSE
Debug Section Formula Evaluation                        := FALSE
Debug Section Script Evaluation Detailed                := FALSE
Debug Section Script Evaluation Simple                  := FALSE
Debug Section Script Evaluation Debug Print Only        := TRUE
Debug Print Sections                                    := Colonies, Construction, Intel, Planets, Politics, Research, Ships, State, System
Debug Section Compute Highest Tech Level                := FALSE
Debug Section Master State Machine                      := FALSE
Debug Section Order Execution                           := FALSE
Debug Section Combat                                    := FALSE
Debug Section Combat Speed                              := FALSE
Debug Section Main Drawing Loop                         := FALSE
Debug Section TCPIP                                     := FALSE
Debug Section End All Players Turn                      := FALSE
Debug Section Host Processing                           := FALSE
Debug Section Phased Movement                           := FALSE


Space Empires Depot | SE:V Balance Mod

» login or register to post comments
Mod Designer

Re: Is there a script debugger??

Submitted by pkoko on Wed, 2007-10-31 18:39.

thanks everyone. Special thanks to Captain Kwok; this what I needed to debug some AI information. I can't promise I will do anything; I was curious on how the AI in SE5 thought and executed commands.

Anyway, I think the above information needs to a be sticky or posted on wiki for those who want to create AI mods or any game mechanics changes like intelligence, ect.

So maybe when school is over for Christmas; I will have some time to fool around with it. I can't promise anything though. As I said, I never did AI work before.

» login or register to post comments
Mod Designer

Re: Is there a script debugger??

Submitted by Gideon on Wed, 2007-10-31 18:52.

Nice, thanks Kwok.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod
or there:

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Popular content

Today's:

  • Issues with Baseship combat pitures
  • Research By Percentage SUCKS
  • Space Empires V 1.74
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • How to deploy starbase

All time:

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Last viewed:

  • SE5_20060929-43.jpg
  • New PDs and Thrusters
  • Scenarios: How to?
  • The reason why armor no longer work as it should in IRM.
  • What am I doing wrong in ground combat ?
(c) Strategy First, Inc. All rights reserved.