Mod Question Repository... Questions come in, answers go out - Page 6

Mod Question Repository... Questions come in, answers go out

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Already has been mentioned.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Could I ask anyone to step up, so I can email em my mod and let them see if they can find a problem?...

This is severely, NOT GOOD FOR MY PRODUCTION!!! I tried everything I can and it still won't work... :cry:
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

Are you by chance using AAI to playtest? If you are then try the non-obvious like cleaning out those pesky files the AAI creates with each run. Make a batch file that contains something like this:

c:
cd \
cd C:\Progra~1\TASpring\AI\AAI\learn\mod\
del %yourmodnamehere%.dat

Deleting that dat file stops a crash that happens when you change your mod's unit files. I'd recommend looking through your AAI folder and make sure both the mod and map folders have the config files they need, too. The config files don't all get created automatically.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

The only way to deal with AIs is to not use them at all.

Are you sure the error is in the .fbi and not another file?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

MadRat wrote:AI blah
For testing purposes I strongly suggest running spring directly using the Commander script.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

rattle wrote:
MadRat wrote:AI blah
For testing purposes I strongly suggest running spring directly using the Commander script.
I do.
Are you sure the error is in the .fbi and not another file?
I am not 100 percent positive its the FBI file, but I am decently positive because i can have all of the other files in play, but it won't crash until I let another units FBI in... Neither of the two units I have work, they both make it crash...

Actually, I will just look around a lot, if both FBI's are crashing, then something somewhere else must be screwed up, eh?

Edit: (Not sure if its helpful or not) It crashes when it gets to loading "Units and Weapons"...
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

rattle wrote:
MadRat wrote:AI blah
For testing purposes I strongly suggest running spring directly using the Commander script.
Or the testglobalai if testing from the client
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

I normally do it from client cause for some reason it says it need corcom if I play it on singleplayer.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

You need two sides in sidedata.tdf at least. You can just copy the first side and call it SIDE1.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

to fix my problem or the corcom one?

(Either way I'm doin it, its beneficial)
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Post by j5mello »

corecom error
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Okay, some minute testing (Proof is my gunship ingame in the LLTA thread), showed that it is not any part of my unit at all that is causing the crash. So, I dunno what it could be now...
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Okay, I dunno what is wrong, but my gunship will not make its lesser turrets aim...

They don't aim, they just wait a second, then start shooting...

Script if ya wanna see (I had my way, then I used smoth's scripting way because it had less characters)

piece base, cannon, barrel1, barrel2, br, brfire, fr, frfire, bl, blfire, fl, flfire;

static-var restore_delay;

#define SIG_AIM 2
#define SIG_AIM2 4
#define SIG_AIM3 8
#define SIG_AIM4 16
#define SIG_AIM5 32

Create()
{
Restore_delay = 5000;
}

RestoreAfterDelay()
{
sleep restore_delay;
turn base to y-axis <0> speed <130>;
}

SweetSpot(piecenum)
{
piecenum = base;
}

AimWeapon1(heading, pitch)
{
signal SIG_AIM;
set-signal-mask SIG_AIM;
turn cannon to x-axis (0-pitch) speed <40>;
turn base to y-axis (heading) speed <80>;
wait-for-turn cannon around x-axis;
wait-for-turn base around y-axis;
return (TRUE);
}

AimFromWeapon1(piecenum)
{
piecenum = cannon;
}

QueryWeapon1(piecenum)
{
piecenum = barrel1;
}

AimWeapon2(heading, pitch)
{
signal SIG_AIM2;
set-signal-mask SIG_AIM2;
turn br to y-axis (heading) speed <70>;
turn br to x-axis (0-pitch) speed <70>;
wait-for-turn br around y-axis;
wait-for-turn br around x-axis;
return (TRUE);
}

AimFromWeapon2(piecenum)
{
piecenum = br;
}

QueryWeapon2(piecenum)
{
piecenum = brfire;
}

AimWeapon3(heading, pitch)
{
signal SIG_AIM3;
set-signal-mask SIG_AIM3;
turn bl to y-axis (heading) speed <70>;
turn bl to x-axis (0-pitch) speed <70>;
wait-for-turn bl around y-axis;
wait-for-turn bl around x-axis;
return (TRUE);
}

AimFromWeapon3(piecenum)
{
piecenum = bl;
}

QueryWeapon3(piecenum)
{
piecenum = blfire;
}

AimWeapon4(heading, pitch)
{
signal SIG_AIM4;
set-signal-mask SIG_AIM4;
turn fl to y-axis (heading) speed <70>;
turn fl to x-axis (0-pitch) speed <70>;
wait-for-turn fl around y-axis;
wait-for-turn fl around x-axis;
return (TRUE);
}

AimFromWeapon4(piecenum)
{
piecenum = fl;
}

QueryWeapon4(piecenum)
{
piecenum = flfire;
}

AimWeapon5(heading, pitch)
{
signal SIG_AIM5;
set-signal-mask SIG_AIM5;
turn fr to y-axis (heading) speed <70>;
turn fr to x-axis (0-pitch) speed <70>;
wait-for-turn fr around y-axis;
wait-for-turn fr around x-axis;
return (TRUE);
}

AimFromWeapon5(piecenum)
{
piecenum = fr;
}

QueryWeapon5(piecenum)
{
piecenum = frfire;
}

AimFromWeapon6(piecenum)
{
piecenum = cannon;
}

QueryWeapon6(piecenum)
{
piecenum = barrel2;
}


edit: Alright, I got it to turn its cannons, but now it turns its main cannon down through its body for no reason every once in a while, and the two cannons on the far side will only turn up or down if the target is on that side...


edit2: Okay, still have the main cannon problem, but none of the other cannons will make it go through itself, but will fire through itself. Are the other cannons problems a placing problem in UpSpring? I'll check on it.

BTW, will weaponmaindir help me with this, does it limit where the unit fires, or where it CAN fire?

Edit3: god, I must suck, it won't even shoot at enemies, WITH ITS CRAPPY AIMING!
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Weaponmaindir will help with cannons firing through itself, you'll just have to calculate proper directions and max. angles for all turrets.
Also, your script has this:

Code: Select all

turn fr to y-axis (heading) speed <70>; 
turn fr to x-axis (0-pitch) speed <70>; 
wait-for-turn fr around y-axis; 
wait-for-turn fr around x-axis;
It's turning one piece around 2 axes at once. I seem to remember this causing problems... Thing to note is your main gun is done differently (it has 2 different pieces).
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Haven't had (or noticed) any problems with turning the same piece around two axes yet, but you should have a turret piece and a barrel one. The latter will aim on the x-axis and the former turn around the y-axis.
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

rattle wrote:Haven't had (or noticed) any problems with turning the same piece around two axes yet, but you should have a turret piece and a barrel one. The latter will aim on the x-axis and the former turn around the y-axis.
Perhaps that is why you don't have problems, each piece has one rotation. :)
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Okay, I'll try that, hope it works, cuz I really don't have anything more important to do..
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

MadRat wrote:Perhaps that is why you don't have problems, each piece has one rotation. :)
I mean I haven't had issues with rotating only one piece either.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Well, I'm trying it, I just got it rigged up to do it (Its kinda confusing cuz two turrets are on their sides and the other two are normal...)

Hope it works!

edit: It didn't work!

The unit is still firing even though its turrets are roughly twenty-five percent off!

It didn't make any difference at all!
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

You know that they should point forward by default (Z+). If they don't, adjust the firepoint's rotation to match the turret's direction (where they actually point to). That should work... i.e. a turret points backward then either rotate the firepoint by 180° around the y-axis or have the turret face forward and rotate the turret then in upspring by 180° instead.

Or you could have everything point straight forward by default and rotate it by script (in Create()).
Locked

Return to “Game Development Tutorials & Resources”