Jump to content



Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  Oblivion Knight : (26 February 2024 - 11:30 AM) Whoa I can edit a typo. The technology.
@  Oblivion Knight : (26 February 2024 - 11:29 AM) Obligatory message.
@  Elwood : (02 January 2024 - 04:19 AM) Happy New Year!!!
@  Aaron : (13 February 2023 - 09:19 PM) I'm still out here alive. If you remember me, I hope you're doing well!
@  Aaron : (13 February 2023 - 09:09 PM) 2023 and this place is still up huhh
@  Elwood : (05 January 2023 - 07:58 AM) Ah a Christmas greeting from Wolfie! Even if I saw it way late Merry Christmas and Happy New Year to everybody!
@  Cero : (31 December 2022 - 09:27 PM) Man that bot went crazy
@  Whitewolf8 : (24 December 2022 - 10:02 AM) I return once more on the eve of Christmas to haunt you all again!... Mainly Elwood. Hello!
@  Elwood : (25 November 2022 - 04:58 AM) A bot! Ah the nostalgia!
@  Elwood : (02 November 2022 - 02:30 PM) Yo ho ho ho! Thar be the white wolf!
@  Whitewolf8 : (24 October 2022 - 12:29 AM) Well, blimey it's been a while. Hoy there! If anyone's still alive here anyway.
@  Valke : (21 April 2022 - 12:12 PM) im taking the 2nd shout of 2022 😂
@  Elwood : (03 March 2022 - 10:12 PM) Mwuhahaha! The first shout of 2022 is mine!
@  Fire Blazer : (12 November 2021 - 05:22 PM) *also stretches arms a little*
@  xcrash1998 : (07 November 2021 - 08:42 PM) "streches arms"
@  Ezra : (07 May 2021 - 05:20 AM) Maybe I'll pop on the discord soon
@  Fire Blazer : (01 April 2021 - 08:08 PM) Aaaaaaand done~ :P
@  xcrash1998 : (29 March 2021 - 08:52 AM) I guess we are one more post away from counting to 2500
@  Fire Blazer : (10 March 2021 - 11:39 PM) but I have bad memory and can't remember ;(
@  Elwood : (15 February 2021 - 10:23 AM) I'd like to but I've told you about my issues with discord before.

Photo

Event issues


  • Please log in to reply
8 replies to this topic

#1 Whatevs-4

Whatevs-4

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 06 July 2015 - 01:04 PM

Hello again. Hope nobody minds me spamming this forum like so. I've moved on to writing my first events. I have gotten the script to assemble without dying at the ends of errors, but that doesn't mean it's actually error free. Several bizarre things are happening with my event.

First, after loading, my characters move to their starting coordinates before moving to the first set of coordinates I tell them to go to.

Second, the enemies always move first.

Third, if an enemy moves, they freeze before they wait, so the game gets stuck (the other characters are still moving on the map, so it is really just that enemy not being able to wait).

Fourth, when I set the enemies to guard (so I don't get stuck at the not-waiting phase), I discover that there is no player phase at all, despite my units being loaded and in their starting positions.

Oh, and if I hadn't set it to fade to map, I'd get that forever black screen. I can't figure out how to dispel that, despite all the commands I've tried.

Heeeeelp! I can't figure out why any of these would be happening. For your reference, here's my script:

//Test script.

#define DISABLE_TUTORIALS
#include EAstdlib.event

EventPointerTable(0x06,Pointers)


ORG 0x00D80000
Pointers:
POIN Turn_events 
POIN Location_events 
POIN Misc_events
POIN BadNM BadHM
POIN Good
POIN Opening_event Ending_event

Turn_events:
TURN 0x00 Opening_event [01,00] 0x00 0x00
END_MAIN

Location_events:
House(0x07,House1,9,2)
END_MAIN


Misc_events:
CauseGameOverIfLordDies
DefeatAll(Ending_event)
AREA 0x08 Item1 [0,0][0,0]
AREA 0x09 Item2 [14,9][14,9]
ENDA

Opening_event:
MUS1 0x0001
SHOWMAP
LOU1 Good
ENUN
STAL 0x10
MOVE 0x03 [09,03]
MOVE 0x17 [08,04]
STAL 0x70
CURF [09,03]
STAL 0x20
TEX1 0x813
REMA
STAL 0x20
MOVE 0x03 [09,01]
STAL 0x10
DISA 0x03
STAL 0x0B
MOVE 0x17 [09,01]
STAL 0x10
DISA 0x17
STAL 0x30
FADI 0x010
BACG 0x01
FADU 0x10
TEX1 0x814
REMA
REPA 0x03
MOVE 0x03 [13,7]
REPA 0x017
MOVE 0x17 [11,8]
STAL 0x10
TEX1 0x815
REMA
LOU1 BadNM
ENUN
ENDA

Ending_event:
MNCH 0x01
ENDA

House1:
FADI 0x10
BACG 0x01
FADU 0x10
TEX1 0x816
REMA
ENDA

Item1:
TEX1 0x817
REMA
ITGV 0x22
ENDA

Item2:
Tex1 0x818
REMA
ITGV 0x27
ENDA

Good:
UNIT 0x3 0x12 0x0 0x9 [2,9] [13,7] [0x1F,0x6B,0x6B,0x0] [0x0,0x0,0x0,0x0]
UNIT 0x17 0x39 0x0 0x8 [4,9] [11,8] [0x1F,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT

BadNM:
UNIT 0x87 0x39 0x0 0x14 [9,1] [9,1] [0x1F,0x0,0x0,0x0] [0x3,0x3,0x9,0x20]
UNIT 0x88 0x39 0x87 0xC [2,6] [2,6] [0x1F,0x0,0x0,0x0] /*[0x0,0x0,0x9,0x0]*/[0x3,0x3,0x9,0x20]
UNIT 0x8A 0x39 0x87 0xC [2,2] [3,4] [0x1F,0x0,0x0,0x0] /*[0x0,0x0,0x9,0x0]*/[0x3,0x3,0x9,0x20]
UNIT

BadHM:
UNIT 0x87 0x39 0x0 0x1D [9,1] [9,1] [0x20,0x0,0x0,0x0] [0x3,0x3,0x9,0x20]
UNIT 0x88 0x39 0x87 0x14 [2,6] [2,6] [0x1F,0x28,0x0,0x0] [0x0,0x0,0x9,0x0]
UNIT 0x8A 0x39 0x87 0x15 [2,2] [3,4] [0x1F,0x6B,0x0,0x0] [0x0,0x0,0x9,0x0]
UNIT


#2 Fire Blazer

Fire Blazer

    You ready?

  • Creator
  • 12,103 posts
  • Gender:Male
  • Location:U.S.A.
  • Interests:Too many to list. =P

Posted 06 July 2015 - 10:35 PM

for the fading out of the black, there should be a code for that. I think it's "OOBB" (no parameters) but double-check the doc if it doesn't owrk.

 

as far as loading units go, the co-ordinates work like this. first, it creates them at the location of the first co-ordinates, then it moves them to the 2nd co-ordinates. the "starting co-ordinates" aren't something they just teleport to at the very end; it's kind of just like a MOVE function that is done automatically for you. so, if you want their final starting locations to be different, you need a separate MOVE command for them all (unless there's battle preps, in which case the unit data's co-ordinates will then be used for the starting positions, which can be changed via the reposition thingy)

 

I think there's macros for the AI bytes, those may be easier to use. perhaps look into that.

 

I think ENUN can be used after MOVE codes too, which should make it wait for the current units that are moving to finish moving first before continuing. this is usually better than the STAL code. (and if you do use STAL, feel free to use decimal instead of hexadecimal if it's easier to comprehend or something)

 

You can't DISA a unit (make them disappear/remove them from the map) until they're done moving, so be sure to do it after the ENUN code. it may look a little weird/unnatural but meh.

 

I'm not sure if REPA is actually the opposite of DISA or if that's just misleading. IIRC DISA actually removes the unit from the memory so they can't reappear unless you load them again using a code like LOU1. If you just want them to be invisible, there might be macros for that, or you could use the UNCM/UNCR codes.

 

If you need any guidance on any specific codes, I'd suggest looking them up in the EA's included doc or reading up on them in an up-to-date tutorial, and lastly, checking out existing scripts that you know work! Sample scripts can be really helpful since they show you just how codes need to be used to work right and such. :)

 

Good luck!


Bblazer2.png

Signature thanks to Shu.


#3 Whatevs-4

Whatevs-4

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 07 July 2015 - 05:09 AM

Thanks! Half of these issues were fixed by not using DISA. I clearly didn't understand that one. But I still have the (much more gamebreaking) issue of the freezing. I now have player phases, and if I move any of my characters, they freeze in place before their action menu pops up, just like the enemies from before. I can't figure this one out, as it seems like the sort of thing the game itself would be handling rather than my code. (I'm betting I accidentally overwrote some important code).



#4 Whatevs-4

Whatevs-4

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 07 July 2015 - 02:29 PM

I switched END_MAIN to TURN and LOCA under their respective headings and I changed ENDA to AFEV under Misc_events. Now when I move a unit, the action menu pops up again! But after I select Wait, the unit freezes and does not proceed to become grayed out/actually wait so that the game ends up in another immovable state.

 

What's this CODE 0x00 command I've been seeing? It produces errors when I include it in my scripts.



#5 Whatevs-4

Whatevs-4

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 08 July 2015 - 03:18 AM

This thread is becoming my live journal. If you have any solutions to anything I ask about, I'd appreciate your input!

I got rid of the freezing by giving my AREA events their own pointer. Everything's going swimmingly now except for two new things. My house event won't happen. At all. It works as an AREA event triggered by waiting in that square. It works as a TURN event. It just doesn't work as a LOCA event. And I very much want to use LOCA events instead of macros, since LOCA events seem way more powerful and customizable.

Also, DefeatAll(Ending_event) is not working. When I defeat all the enemies, it just continues business as usual with no enemy phase. The problem isn't with the Ending_event itself, as it works fine when I trigger it with different event types. DefeatAll just doesn't seem to be working (even when I have it go to other events I know work).

Any ideas? Everything else is going better than I ever imagined though. Hacking is so cool; I feel so powerful.

 

Here's my script:

//Test script.

#define DISABLE_TUTORIALS
#include EAstdlib.event

EventPointerTable(0x06,Pointers)


ORG 0x00D80000
Pointers:
POIN Turn_events 
POIN Location_events
POIN Misc_events Area_events
POIN Opening_event Ending_event

Turn_events:
TURN 0x00 Opening_event [01,00] 0x00 0x00
TURN

Location_events:
LOCA 0x0A House [09,01] 0x10D6
LOCA


Misc_events:
CauseGameOverIfLordDies
DefeatAll(Ending_event)
AFEV

Area_events:
AREA 0x08 Item1 [0,0][0,0]
AREA 0x09 Item2 [14,9][14,9]
AREA

Opening_event:
MUS1 0x0001
OOBB
LOU1 Good
ENUN
STAL 0x40
CURF [09,03]
ENUN
TEX1 0x813
REMA
STAL 0x20
MOVE 0x03 [09,01]
ENUN
UNCM 0x03 0x01
ENUN
MOVE 0x17 [09,01]
ENUN
UNCM 0x17 0x01
STAL 0x30
FADI 0x010
BACG 0x01
FADU 0x10
TEX1 0x814
REMA
UNCR 0x03 0x01
MOVE 0x03 [13,7]
STAL 0x10
UNCR 0x17 0x01
MOVE 0x17 [11,8]
ENUN
STAL 0x40
TEX1 0x815
REMA
LOU1 Bad
ENUN
CURF [1,0]
ENUN
TEX1 0x816
ENDA

Ending_event:
TEX1 0x818
ENDA

House:
FADI 0x10
BACG 0x01
FADU 0x10
TEX1 0x816
REMA
ENDA

Item1:
TEX1 0x817
REMA
ITGV 0x22
ENDA

Item2:
Tex1 0x818
REMA
ITGV 0x27
ENDA

Good:
UNIT 0x3 0x12 0x0 0x9 [2,9] [9,3] [0x1F,0x6B,0x6B,0x0] [00000000]
UNIT 0x17 0x39 0x0 0x8 [4,9] [8,4] [0x1F,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT

Bad:
UNIT 0x87 0x39 0x0 0x14 [1,0] [1,0] [0x1F,0x0,0x0,0x0] [0x3,0x3,0x9,0x20]
UNIT 0x88 0x39 0x87 0xC [0,0] [0,0] [0x1F,0x0,0x0,0x0] [0x0,0x0,0x9,0x0]
UNIT 0x8A 0x39 0x87 0xC [0,1] [0,1] [0x1F,0x0,0x0,0x0] [0x0,0x0,0x9,0x0]
UNIT

MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: ????????


#6 Snow

Snow

    The Combat Medic

  • Veterans
  • PipPipPipPipPipPipPipPipPipPip
  • 926 posts
  • Gender:Male
  • Location:Santiago de Chile
  • Interests:Tons of stuff, figure them out yourself.

Posted 08 July 2015 - 03:42 PM

When you say that it's not triggering, do you mean that the House option doesn't appear? Or that when a character steps on that tile nothign happens, because (as I understand it at least, I wouldn't know how to do a house with a LOCA event) LOCA events only trigger after you wait there? I might be completely wrong on this.

 

 

The DefeatAll thing is really wierd, idk what could be causing it... maybe try changing the event to something different? I know you said that the event itself works fine, but maybe it's something about the event + DefeatAll that causign the glitch? I wish I could help you more but I'm really bad at reading events in hex, I use definitions XD. Also, and this is probably just me not knowing what a hex unit is like, but where's the units level here:

 

UNIT 0x87 0x39 0x0 0x14 [1,0] [1,0] [0x1F,0x0,0x0,0x0] [0x3,0x3,0x9,0x20]

 

As I see it it would be

 

UNIT 0x87 (character) 0x39 (class) 0x0(leader) 0x14(level and alegiance should be here?) [1,0] [1,0](Position stuff) [0x1F,0x0,0x0,0x0](Inventory Stuff) [0x3,0x3,0x9,0x20](AI stuff)

 

Since alegiance, aka if they're good or bad, goes in the same place as the marco, maybe that's causing youer DefeatAll error?

 

What's this CODE 0x00 command I've been seeing? It produces errors when I include it in my scripts.

IIRC it's supposed to be like a blank entry so that the EA knows that the "List" ends there, though sometimes it doesn't work so it's better to use the other ones, like UNIT in the case of a unit list or AREA in area events.


Posted Image
Posted Image
This won't be removed until Chile wins the World Cup - Started 24/06/12
BTW, I take map requests if anyone wants to make one XD, just send me a PM and I'll most likely accept. If you wanna see some of previous work you can visit my gallery here, I'd skip to the end because I've improved alot XD.

#7 Whatevs-4

Whatevs-4

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 09 July 2015 - 09:23 PM

I meant the Visit option never popped up. And the level and allegiance are both contained in the 0x14 bit; the available level/allegiance combinations have their own hex IDs which you can look up using Nightmare. I think that one's Level 2, enemy, not auto-leveled.

 

My code works now. How'd I fix it? Used the template and copy pasta'd my events into it. I have no flipping clue why that solved the issues, since my syntax had all been correct before. I'm guessing there's some aspect of the syntax that I was missing, like the order in which my events were present in the code and the lay-out and number of pointers I had mattered. If anyone knows more specific details about this sort of thing, I'd be interested in learning them.



#8 Snow

Snow

    The Combat Medic

  • Veterans
  • PipPipPipPipPipPipPipPipPipPip
  • 926 posts
  • Gender:Male
  • Location:Santiago de Chile
  • Interests:Tons of stuff, figure them out yourself.

Posted 10 July 2015 - 01:13 AM

I meant the Visit option never popped up. And the level and allegiance are both contained in the 0x14 bit; the available level/allegiance combinations have their own hex IDs which you can look up using Nightmare. I think that one's Level 2, enemy, not auto-leveled.

 

My code works now. How'd I fix it? Used the template and copy pasta'd my events into it. I have no flipping clue why that solved the issues, since my syntax had all been correct before. I'm guessing there's some aspect of the syntax that I was missing, like the order in which my events were present in the code and the lay-out and number of pointers I had mattered. If anyone knows more specific details about this sort of thing, I'd be interested in learning them.

I'm gonna give you the normal hacking answer. Ahem.

 

Hacking is wierd :mellow:

 

Nah really though, sometimes things just fail and when you try to insert it again it works.


Posted Image
Posted Image
This won't be removed until Chile wins the World Cup - Started 24/06/12
BTW, I take map requests if anyone wants to make one XD, just send me a PM and I'll most likely accept. If you wanna see some of previous work you can visit my gallery here, I'd skip to the end because I've improved alot XD.

#9 Fire Blazer

Fire Blazer

    You ready?

  • Creator
  • 12,103 posts
  • Gender:Male
  • Location:U.S.A.
  • Interests:Too many to list. =P

Posted 10 July 2015 - 06:58 PM

I'm gonna give you the normal hacking answer. Ahem.

 

Hacking is wierd :mellow:

 

Nah really though, sometimes things just fail and when you try to insert it again it works.

 

pretty much

 

also *weird

 

(I'm lazy and don't feel like reading the rest of the posts, let me know in concise form if there's anything I should try to help with... not that I could offer much help given I don't hack anymore and hardly remember crap and don't even like talking about it lol)


Bblazer2.png

Signature thanks to Shu.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users