Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home3/tedson/public_html/metalshard/header.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /home3/tedson/public_html/metalshard/header.php:14) in /home3/tedson/public_html/metalshard/header.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /home3/tedson/public_html/metalshard/header.php:14) in /home3/tedson/public_html/metalshard/header.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home3/tedson/public_html/metalshard/header.php:14) in /home3/tedson/public_html/metalshard/header.php on line 25

Warning: Cannot modify header information - headers already sent by (output started at /home3/tedson/public_html/metalshard/header.php:14) in /home3/tedson/public_html/metalshard/header.php on line 26
Pocket PC Forum page 1 topic 548 at MetalShard
MetalShard, inc.
Pocket PC and Windows Games and Software

Pocket War (Game) Forum




This is a message in the Pocket War (Game) forum. If you would like to reply to this subject then fill in your reply in the box at the bottom of the page and click the Reply button. To get back to the main page for this forum click the Topics button.

Subject - DragonWar Mod for PocketWar 1.5
Pages: [1] Messages 1 - 5 of 5
Posted By: San Dog (2005-04-19 17:02:21)

I almost have the mod done, but I keep getting this error in my mtrace.txt file:
105797 ERROR - SCRIPT: setScript - script Transport AI will not work with Brown in file F:\Program Files\MetalShard\DragonWar/scripts/agressive_aicity.js on line 345

Line 345 of agressive_aicity is this:
if( script != '' ) setScript( unitLeaving, script );

Brown is created in createUnit in city.js like so:
setStats( unit, 2, 4, 3, 2 );
setMovement( unit, 2, 'fly', 70, true );
setAttackAdjustment( unit, -15, 15, 0 );
setTransport( unit, 1, '-Grunt-Archer-Gnome-Hero' );
setSounds( unit, installDir + 'dragonwar/sounds/roarbite.wav', installDir + 'dragonwar/sounds/swhoosh.wav', installDir + 'dragonwar/sounds/roar.wav' );
setImages( unit, installDir + 'dragonwar/units/brown.png', installDir + 'dragonwar/units/brownmask.png', false );
setDefaultMove( unit, 'explore' );
setDefaultAction( unit, 'attackunits' );

And when I register Brown, I use the '-transport' usage flag: registerUnitType( 'Brown', false, 90, '-transport' );

And transport.js, worksWithThisTile() has this line:
return unitHasPurpose( tile, '-transport' );

So how come it keeps giving this error? Once I resolve this error, the mod will be complete. It's nice. :) I like the fact that less emphasis is placed on water, and more is placed on air. The dragons are neat!



Posted By: Tully (2005-04-19 17:19:47)

you probably have more than one transport AI script being loaded. (the one from dragon wars and the one from pocket wars) Try changing the logical name of the script (at the top of the file) and then changing the calling code (wherever it gets the name "transport ai" from) and see if that fixes it.

If not zip it up and email it to me and I will try and take a look at it later tonight (probably some time after midnight CST)

The code you wrote up there looks right.
Posted By: San Dog (2005-04-19 17:27:34)

Nevermind, there were two versions of worksWithThisTile and I think it was causing problems in the script. An artifact of cut-n-paste. :P

A few more tweaks and I will be ready to upload the mod. I'm still a little confused about the install process, however. What I did was create a directory called DragonWar where I put all of the script, unit, and tile files. The start and end game images go there as well. I then created a file called dragonwar.mod and basically copied pocketwar.mod, changing paths were appropriate. This is were I got a little confused. For some reason, I could use the original shortcut by modifying the MOD= switch. I had to right-click mge.exe and choose create Create Shortcut, setting the values appropriately, adding the MOD=dragonwar switch. I named the shortcut DragonWar, so it seems fairly logical, but I'm not sure if that's the correct technique.
Posted By: Tully (2005-04-19 18:01:49)

Dragonwar is not a standard mod. It is a full mod which redefines the entire game.

mge.exe is the Metalshard Game Engine. Pocket War is just a mod on top of that. MGE takes a mod switch on the command line and uses that to choose the right game definition file. (if no mod is given it assumes pocketwar.) The directory in the file sets the main subdirectory where the scripts for that full mod are stored, and it will automatically load any scripts in that subdirectory (or any subdirectory under it.)

I dont have a good way to create the shortcut without building a full install program though. That is still a problem.
Posted By: San Dog (2005-04-19 19:18:07)

Okay, I found the original readme.txt and modified it slightly. I think that should do for now. I've tested both AI's for about an hour each without any issues. I've also built all the units in the game to verify functionality.
Pages: [1] Messages 1 - 5 of 5




Reply


Attach File (zip and pwg files only)


you must be logged in to post
 
Copyright 2003-2010 MetalShard, inc. Games for Windows and Pocket PCs pocket war forums, automation software freegames