• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
October 31, 2024, 08:36:24 pm

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen, RetroArch, and Duckstation are recommended for playing/testing, pSX is recommended for debugging.


Spritemove issues using event editor

Started by Arimala, July 11, 2013, 03:52:09 am

Arimala

Hey all, somewhat new to the site, i have been doing minor changes to the original game...like making battles harder by adding more units to fight and what not... So I have been using the event editor, reading up on the tutorials to edit the story battles, the last thing I have left. 

I have searched quite a lot but haven't been able to find what I was looking for...In some of the story battles more units join the battle after "X" happens (like a guy whistles, or something like that) so I have been trying to use the spritemove command for the extra units that I am adding to walk into the battle with the rest of the units that normally do so and I keep getting stuff like...


unit facing isn't important in this, i know that is messed up, I am just trying to fix it so the guy is actually standing on one panel and not in the middle of two. The way the map is set up he should only be moving on the Y axis but I even tried changing around the axis with no success

this is what i have added into the original event if it helps..
ColorUnit(x88,x00,x01,-006,-004,-002,000)
SpriteMove(x88,x00,+00016,+00000,+00000,x00,x01,+00000)
UnitAnim(x88,x00,x03,x00,x00)
Draw(x88,x00)
ColorUnit(x88,x00,x08,+000,+000,+000,004)
SpriteMove(x88,x00,-00016,+00000,+00000,x00,x01,+00020)
WaitSpriteMove(x88,x00)
UnitAnim(x88,x00,x02,x00,x00)


I based it off of the code I saw at http://ffhacktics.com/smf/index.php?topic=9506.msg185603#msg185603. My use of it might be wrong though as I am still trying to figure everything out with easyvent. I have tried several different combos messing with the xyz but I cant seem to figure it out. If anyone could help me out with this or if you know a better way of acheiving the "walk onto the battlefield effect" it would save me a lot of time doing guess and check with the editor. thanks in advance
  • Modding version: PSX

Xifanie

Quote from: Arimala on July 11, 2013, 03:52:09 amIn some of the story battles more units join the battle after "X" happens (like a guy whistles, or something like that) so I have been trying to use the spritemove command for the extra units that I am adding to walk into the battle with the rest of the units that normally do so and I keep getting stuff like...

First of all, you can't do that. The game will break terribly if any other unit is present where the new one is supposed to spawn. That will make 2 units on top of each other, and those 2 units won't be able to do anything because the AI can't handle this and just wait, and I'm pretty sure it causes them to gain infinite turns.

As for your code itself, you're completely misinterpreting the whole thing. Coordinates are absolute, but relative to the tile the unit is linked to. not relative to the sprite's position. Meaning if you want the unit to go back to the center of its tile, X/Y/Z all have to be 0.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Arimala

QuoteFirst of all, you can't do that. The game will break terribly if any other unit is present where the new one is supposed to spawn. That will make 2 units on top of each other, and those 2 units won't be able to do anything because the AI can't handle this and just wait, and I'm pretty sure it causes them to gain infinite turns.


not sure where you got that from, i am just adding more units to the battles while remaining within the limit of 16. I wasn't adding more units to a specific coordinate though.

QuoteAs for your code itself, you're completely misinterpreting the whole thing. Coordinates are absolute, but relative to the tile the unit is linked to. not relative to the sprite's position. Meaning if you want the unit to go back to the center of its tile, X/Y/Z all have to be 0.


This helps a lot though. Yea I figured I had something wrong especially since I don't know anything about coding. Thanks for the quick reply xif, you saved me a lot of time.
  • Modding version: PSX

Xifanie

Ok, let me make that more clear for you, you can NOT introduce new units on the field if the fight is already ongoing. That's why in vanilla, the only time it happens, the event forces Ramza and Wiegraf to move to two distinctive tiles so the game wouldn't potentially bug all over the place.

However, I don't think your battle is setuped so conveniently. Another way to do is it placing an invincible unit with permanent stop where your new unit will spawn, and remove it at the moment to introduce your new unit.

And how can you -not- add units to a specific coordinate? You have to, and it's precisely why you couldn't do this so easily.

Although, you know, I might have gotten all this wrong because of the way you worded it, if so I apologize. 8D
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Arimala

heh, yea I think you misunderstood what i meant by adding units after a guy whistles or something. I am not adding units mid battle but just making it so at the beginning of the fight I am up against say 10 guys instead of just 6. For example, in the screenshot I took for the barius valley battle where you have to save agrias the battle doesn't just start right after you finish your formation setup like it would for a random battle. It starts with agrias running into picture and the guy chasing her then he whistles to call his buddies in...thats when I am adding the extra units...so they all walk into battle together.

When I went through redoing all the random battles to make it so I am fighting giant mobs of monsters all the time I only had to use the fftpatcher and just put always present or randomly present...you can do that for some of the story battles too but if I did it with say that barius valley battle they would be standing there even before agrias walks into picture.

And I meant to say... I wasn't adding another unit on top of a unit that is already at a specific coordinate.

Yea sorry about that, I was trying to paraphrase all the stuff I was thinking so I didn't have a wall of text. I have been trying to learn as much as possible on this stuff so thanks again for the help
  • Modding version: PSX

Xifanie

I think you can simply have a unit without Always/Randomly present and use Draw() when you want them to appear on the map. If you're lazy you can also use Erase() at the very beginning of the event.

But I get your idea, good luck managing with the 9 spritesheets limits.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

3lric

IF he does it with Not Present/Random Present. He will have to use the whole ADDUNIT string, then he can use a draw command as so:

AddUnitPrep()
UnitPresent(x01,x00,x01)
AddUnitStart()
Wait(00030)
AddUnitEnd()
Draw(x01,x00)
  • Modding version: PSX

Jumza

Quote from: Xifanie on July 11, 2013, 07:21:46 pm
If you're lazy you can also use Erase() at the very beginning of the event.

Ouch, that hurts Xifanie :(
  • Modding version: PSX
Nyzer: Alma teleports out of her own possessed body.
Raijinili: Remember that you're telling a modding community that the game they love could use some fixing.

Arimala

I have just been looking at the original event codes and try to go with the flow by adding in my commands where the original are.
like this small example...
original commands
AddUnitPrep()
UnitPresent(x84,x00,x01)
UnitPresent(x85,x00,x01)
AddUnitStart()
Wait(00030)


my commands
AddUnitPrep()
UnitPresent(x84,x00,x01)
UnitPresent(x85,x00,x01)
UnitPresent(x86,x00,x01)
UnitPresent(x87,x00,x01)
UnitPresent(x88,x00,x01)
AddUnitStart()


and then the same kind of stuff for draw/colorunit/unitanim/etc.

it has worked pretty smoothly so far but before xif helped me out with the spritemove I was just winging it by adding those extra guys when they were off camera or sometimes just behind an object so you couldn't see them just warp-in out of nowhere and not make an animation. Otherwise it just looked awkward to have a bunch of guys walk in with one or two guys magically warping in :)
  • Modding version: PSX

Xifanie

Quote from: Jumza on July 11, 2013, 11:17:51 pm
Ouch, that hurts Xifanie :(


Don't take it personal Jumza, I assumed it was better to do it the vanilla way, but Elric just proved me wrong. Erase() uses less instructions overall, so even though it's not how vanilla does it, I see it as superior now. Just remember you've already made more events than I, so I don't always know what I'm talking about since I barely have any experience. I have NO idea how to design events for storyline flow.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful