EnergyCost line not working - updated

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

EnergyCost line not working - updated

Post by Fiodis »

I made a unit that uses a custom mesh, weapon mesh, and combo. The combo uses Dooku's anims, but the states are modified, and two new ones are added. In-game, however, he just uses Dooku's normal combo. Why is that? There is nothing about it in my error log, and yet he still reverts to the stock combo. I'm certain my transitions are correct, and my memory pools are rather high (it's based off a hero assault LUA).

Even more oddly, when I try saber toss with this new mesh, it just vanishes from his hand and reappears some time later - you can't see it travelling through the air.

Also, I modified Luke's combo in a similar way. The changes showed up, to a certain point, then when I added in several EnergyCost lines, they didn't show up. Again, nothing in the error log about this.


What is going on here, and how can I fix it? If you need any further information, just ask.


On a possibly related note, I have an odd error log message:
Hidden/Spoiler:
[code]Message Severity: 2
.\Source\SoldierAnimationData.cpp(900)
SoldierAnimationData[5f0ce10d]::Animation: animation data 'sprint_upper' was already read[/code]
I've never seen that before. What does it mean?

EDIT: Ah, by removing Dooku from the LUA, the changes show up, but not the EnergyCost ones. How does one go about using that line? And the weapon mesh still disappears when I try to throw it.

EDIT 2 - Goody, I got the mesh to show up while being tossed through a manual clean and remunge. However, the EnergyCost still isn't working. Here's a sample of how I try and use it, see any problems?
Hidden/Spoiler:
[code]State("ATTACK1")
{
Posture("Stand");
Animation("stand_attack1a");
Sound("saber_swing");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(5, 9, "Frames");
EnergyCost(3.0);
DamageLength(1.5);
DamageWidth(0.75);
Damage(200);
Push(0.0);
}

Transition("ATTACK2")
{
If()
{
TimeStart(5, "Frames");
TimeEnd(16, "Frames");
Posture("Stand");
Energy(">=", 3.0); // at least one attack move
Button("Fire", "Press");
}
}

Transition("STOMPATTACK_FALL")
{
If()
{
TimeStart(5, "Frames");
TimeEnd(16, "Frames");
Posture("Stand");
Energy(">=", 50.0); // at least one swipe move
Button("FireSecondary", "Press");
}
}

Transition("RECOVER1");
}[/code]
Post Reply