The 3rd Age

Master Hero Mod 2.1.9

Master Hero Mod 2.1.9

Enhances Visuals, provide series of modifications and additions to the game play,Support Multiplayer

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Testing of scripted maps

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of MotWlRimli

MotWlRimli

Category: Worldbuilder
Level: Beginner
Created: Wednesday January 6, 2010 - 9:39
Updated: Wednesday January 6, 2010 - 10:25
Views: 5012
Summary: How to test if scripts on maps of for the AI are executed properly

Rating

Staff says

4.5

Members say

-

Average

4.5/5.0

2 votes

Page 1 2
What is this tutorial about?
This article will give you some hints how to test your scripts easily.

Basicly I will show you two points how to improve the testing and creating of your scripts:

1: Improving scripting using -scriptdebug2
2: How to test scripts on maps quickly


1: Improving scripting using -scriptdebug2

The BFME game.dat provides a powerfull tool developing scripted maps or new scripts for an AI etc. which is unfotunally not quite well known.

You can use it when you edit your BFME shortcut on the desktop.

Right click on the shortcut and edit the first line.

You should see the path to your BFME-directory, by default:
"C:\Program Files\EA GAMES\The battle for middle-earh(tm)\lotrbfme.exe"

Add "-win -scriptdebug2" to this line. It should now look like this:
"C:\Program Files\EA GAMES\The battle for middle-earh(tm)\lotrbfme.exe" -win -scriptdebug2

Make sure that there is a space character before -win -scriptdebug2

Explanation:
-win will make the game to start in the window mode. This will provide you better testing conditions.
-scriptdebug2 will create a new window when you run the game looking like this:

User image

This will provide you new powerful functions:

But before we continue some theory how BFME runs scripts: BFME uses the frames as game-intern chronometer. With every frame BFME considers which script must be executed and runs it if the conditios are true.

The list under "Messages" shows you which script was executed at which frame.
The list under "Variables" shows you the active timers, flags, counters etc. with their current value.

The buttons have different functions:
Pause: Pauses the execution of the scripts, the game is freezed.
Step: Let the game.dat run the actions which will take place exactly at the next frame.
Step 10: Let the game.dat run the actions which will take place exactly at the next 10 frames.
Run Fast 10x: The game.dat will execute the actions with tenfold speed. This is similar to the fast watching of replays but now you can acutally play the game.
Clear: Clears the list under "Messages".

This is very helpful creating scripts and debugging the scripts.

Continue with the next page to learn how to test scripted maps quickly without reloading the game.

Credits

Comments

Display order: Newest first

Rob38 (Team Chamber Member) - Friday August 27, 2010 - 20:03

Never knew about the material in page 2. Will be very helpful for me. :)

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
13:54:27