• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 18, 2024, 12:37:28 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.


Could someone kindly build me an example script?

Started by DERIDEX120, December 19, 2015, 07:44:57 pm

DERIDEX120

I need a different approach to understanding event scripting.  Can someone build a script with 3 people standing around making small talk, someone teleport in, walk to the crowd, teleport out, just tricks like that?
  • Modding version: PSX & WotL

Jumza

  • 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.

Jumza

December 19, 2015, 08:52:48 pm #2 Last Edit: December 19, 2015, 09:00:38 pm by Jumza
It's really rough and quickly thrown together but you get the idea. If you're going to copy / paste stuff right from this, I suggest reading the wiki for each instruction to make sure it's what you want for your event. For example, you may not want the first message bubble to pop up more quickly than the others, but that's what I did, so you'll have to change it :)

Also note, this was done using the updated CONFIG.INI and is therefore not compatible with the old one / the most current version of EasyVent (unless you've updated your CONFIG.INI file there).

Offset(x00002000)

UnitAnim(x04,x01,x0002,x00)
Erase(x80,x00)

{63}(r79)
Camera(+00500,-00048,+00900,+00302,+00512,+00000,+04096,+00001)
Reveal(060)

WalkTo(x81,x00,004,004,x00,x00,+008,x01)
WaitWalk(x81,x00)
UnitAnim(x81,x00,x0002,x00)

DisplayMessage(x10,x11,x0001,x81,x00,x00,+00000,+00000,+00000,x01)
WaitForInstruction(x01,x00)

RotateUnit(x82,x00,x00,x00,x00,x00)
WaitRotateUnit(x82,x00)

DisplayMessage(x10,x11,x0002,x82,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)

Wait(00050)

Sound(x006B)
Draw(x80,x00)
TeleportIn(x80,x00)

Wait(00030)

RotateUnit(x81,x00,x08,x00,x00,x00)
WaitRotateUnit(x81,x00)
RotateUnit(x82,x00,x08,x00,x00,x00)

DisplayMessage(x10,x12,x0003,x80,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)

DisplayMessage(x10,x11,x0004,x81,x00,x00,+00000,+00000,+00000,x01)
WaitForInstruction(x01,x00)

WalkTo(x80,x00,004,008,x00,x00,+008,x01)
WaitWalk(x80,x00)
UnitAnim(x80,x00,x0002,x00)

DisplayMessage(x10,x11,x0005,x80,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)

DisplayMessage(x10,x11,x0006,x81,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)

DisplayMessage(x10,x11,x0007,x80,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)

Wait(00030)

TeleportOut(x80,x00)

Wait(00030)

RotateUnit(x82,x00,x00,x00,x00,x00)
WaitRotateUnit(x82,x00)

DisplayMessage(x10,x11,x0008,x82,x00,x00,+00000,+00000,+00000,x02)
WaitForInstruction(x01,x00)

Wait(00070)
FadeSound(x00,120)
ColorScreen(x02,000,000,000,255,255,255,+00120)
WaitForInstruction(x0C,x00)
EventEnd()

//INSTRUCTION SECTION END -  TEXT START
//Message x01
{font:08}DERIDEX120{br}
{font:00}I wonder where Jumza is?{br}
He said he would meet me here!{end}

//Message x02
{font:08}Eternal{br}
{font:00}Mr. Peanut?{br}
Yeah, he's always late.{end}

//Message x03
{font:08}Jumza{br}
{font:00}You know it's not nice to talk{br}
about someone behind their back!{end}

//Message x04
{font:08}DERIDEX120{br}
{font:00}Jumza!{end}

//Message x05
{font:08}Jumza{br}
{font:00}I posted that thing you wanted{br}
on the forum Deridex, hope it helps!{end}

//Message x06
{font:08}DERIDEX120{br}
{font:00}Oh, it totally will!{br}
Thanks so much!{end}

//Message x07
{font:08}Jumza{br}
{font:00}Awesome! I have to go though,{br}
I'll see you guys later, ok?{end}

//Message x08
{font:08}Eternal{br}
{font:00}That Mr. Cashew,{br}
always so eager to help.{end}

[youtube]OB7Ds4KBl9Y[youtube]

I even made you a video so that you could follow along if you feel lost. Feel free to ask questions!
  • 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.

DERIDEX120

Thanks! Thats very helpful.
When you use teleport in, how does it know which tile for them to appear? Does it get that from ETND?
  • Modding version: PSX & WotL

Jumza

  • 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.

DERIDEX120

Okay, brace yourself. I still have loads of questions.
1. Where ecactly is that list of commands on wiki? I may have overlooked it.
2. Where is the list of sounds and can I add to it?
3. How is it you get characters to make unique poses? (Like the knight seen in the academy making the "I dont know" pose.)
4. With the earthquake command, nothing I did was acceptable to the program. It insisted it would cause errors if compiled.
5. Why are there 4-5 lines of camera commands in most events?
6. Is it possible to have an item added to your inventory after a battle? (My idea was to have a recurring boss drop rare items every time he's beaten.)
  • Modding version: PSX & WotL

Jumza

1. http://ffhacktics.com/wiki/Event_Instructions
2. Click on the Sound command on the above linked page.
3. Click the UnitAnim command for the above page and look around for the keyword EVTCHR, special poses are called EVTCHR's and you can use them by using the UnitAnim command with LoadEVTCHR and SaveEVTCHR commands.
4. Do you have the most updated CONFIG.INI file? If you do and are using EasyVent, you will have problems. More on this later~
5. Sometimes the game gets the camera to spin. You can see that in the event I created for you I only used one. Get creative with camera's once you are comfortable with them :)
6. Yes. Xifanie created an ASM hack called the event instruction upgrade, which allows you to do stuff like that. An easier method, if you go into the ENTD of the FFTPatcher, if you select a unit you can have them drop one item and X times 100 gold when / if they are killed. If you want more than one item you will need the previously stated hack.

Quick Question: Are you working with the most updated CONFIG.INI file? Otherwise the command list on the wiki and the event I posted above are going to be almost useless for you :(
  • 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.

Kokojo

1: This is your holy grail if you want to event edit. (If you want extra teleporting around, you can also Erase() a sprite, WarpUnit, then draw + teleport the unit at the same time)
http://ffhacktics.com/wiki/Event_Instructions

2: Pretty sure you can't, but I might be wrong
http://ffhacktics.com/wiki/Event_Instruction_21

3: Unique poses are available thanks to EVTCHR, a special files containing all the special animations. For custom caracthers, you have to make all the poses. They can pose a LOT of challenge due to their nature.
http://ffhacktics.com/wiki/Event_Instruction_58

4: Are you sure you're using a CONFIG.INI that matches your version of the compiler ? Is there an EarthquakeEnd somewhere in your script?

5: Cameras are also a bitch to event over. There is a command to ''fuse'' cameras and make it easier to see what you want to see. It's really mostly just something you learn over time. FFT programmers also had different tools, it's possible their camera fusion always caused no problem, so they used multiple.

6: You could make a unit silently join the party and then immediately dismiss it during a cutscene. Or you could simply make the unit, via FFTpatcher ENTD's option, drop a ''treasure'' (Bottom right). You can give only 1 per unit, but the reward can be changed each time.
I keep leaving, I keep coming back. Boomerang boy.

DERIDEX120

this is where i got my new config from, but I don't know if there is a later version.
http://ffhacktics.com/smf/index.php?topic=8229.0

I won't feel so discouraged when I get my first event down pat. even though it may take me a century. :roll:
  • Modding version: PSX & WotL

Jumza

Oh! Great! I'm pretty sure that's the newest one! Well then everything should be working just fine as long as you are taking instructions from that wiki page, and not from EasyVent as many beginners do. EasyVent wasn't updated along with the CONFIG.INI file, so you have to rely on the wiki for that stuff.
  • 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.

DERIDEX120

that was likely my problem then. I really only have the time to jump on this but 10 minutes at a time, so my progress will be without haste. I'll update you on my progress though and will pop in here for questions. If everything goes smoothly, I'll mark this thread as solved in a few days if I'm grasping the syntax without loads of questions.

thanks for your help! I would never have guessed the editor's commands would be out of date.
  • Modding version: PSX & WotL

Jumza

That's alright :) Take it one step at a time, at whatever pace you can manage!

What I tend to do (since I used to be an avid user of EasyVent), is to just have the event.txt file open next to a web browser with the wiki page of instructions open. And sometimes a map if I need one (there is also a maps page on this site). If you like the way EasyVent has all the maps, you can still use it, but just use it as a text editor / map viewer, and still have that web browser with the wiki open on it, since all the info of the program itself is dated (or at least most of it).
  • 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.

DERIDEX120

So you pretty much bypass easyvent alltogether and just dive straight into the event.txt file?

I just follow the instructions on the tutorial I linked above, and from what I understand, I have to use the test.evt for every event I change, because that's what i can locate in cdmage.
so, easyvent> find test.evt> change stuff> change attackout> hope it saved> import into cdmage> testrun..

do you have a better process?
  • Modding version: PSX & WotL

Jumza

That's basically what I do :P
Of course, I never have to find my test.evt because it's always in the same folder as my event.txt file. (What do you mean by find test.evt? :o)
For me it's essentially create event.txt > make the event > compile into test.evt > import via cdmage > watch it!

Of course that doesn't include patcher work or attack.out work, or even testing. Testing can become much easier using savestates and the psx emulator, but you should get used to making events first, or at least complete one before jumping into a whole other process.
  • 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.

DERIDEX120

okay, so one question on that is if one file (test.evt) is used to redo every event in the game, how is it organized?
I guess my question is if I completed my first event, orbonne prayer, would my next test (being the orbonne battle or the academy scene) not overwrite the orbonne prayer i had previously finished?
  • Modding version: PSX & WotL

Jumza

It wouldn't! Test.evt holds the data for every event in the game, every event is started off with one of these:
Offset(x00000000)
Those 0's are a number that correspond to which slot the event will overwrite, for example, the event I gave you above uses Offset(x00002000), which is the very first event. Offsets go up by 2000 each time, so the next event is Offset(x00004000), or some other multiple of 2000. So as long as you have a different offset at the top, your events will not overwrite eachother!
  • 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.

DERIDEX120

Outstanding. That was actually a high concern of mine.
So with this example, the orbonne prayer event, do I need to do anything at all with the orbonne prayer (setup) file? I peeked in it and saw a jumble of code.
  • Modding version: PSX & WotL

Jumza

Setups are interesting in that they are totally unnecessary for everything. They are just empty space that you can fill with your own events if you have the knowledge on how to shift stuff around in the ATTACK.OUT to facilitate these changes. That's some higher levels of stuff you don't need to worry about unless you plan on making a huge mod. For now, leave setup events as they are and just copy the Offsets from the events you do intend to overwrite.
  • 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.