Posted: Tue Mar 03, 2015 9:14 am Post subject:
FinalSun.exe bugfixing/improvement (request)
This is a request for all those who can do more than just hex-editing.
At Offset 001EEFD4 stands the string for the trigger Type
FinalSun has
0 - Standard
2 - Repeating
but these names are quite wrong and there are also other values allowed.
image showing the value 1 which is an AND relation
Can someone with (dis-)assembler knowledge improve/fix that and let FS offer
0 - OR one time
1 - AND one time
2 - OR repeating
3 - AND repeating _________________ SHP Artist of Twisted Insurrection: Nod buildings
That must be most cryptic answer i ever got.
I have a vague assumption about what you're talking, but i'm far from using that to fix the mentioned FinalSun.exe bug. (i have no IDA disassembler nor enough assembler coding knowledge to change the resources)
So a finished fixed exe file would be much appreciated.
Or a modexe ini entry, so everyone can apply this on his own. _________________ SHP Artist of Twisted Insurrection: Nod buildings
What, I didn't know there was a fourth option (3). Now that you describe them, it would be weird if there wasn't. I don't think RA or TD had more than 0, 1 and 2, though? _________________
I know for sure TD had 4 options too and in the same pattern
OR
AND
repeating OR
repeating AND
The issue with repeating AND is, that it can be used only in quite rare cases.
Usually when you check if multiple objects are destroyed, then it can't happen a second time that these get destroyed to fire the trigger a second time.
But i think you can use the repeating AND for example on multiple buildings which have "6 Attacked by any House".
So every time all the buildings got attacked, the trigger should fire.
A classic usage for the repeating AND is also on cell triggers. Those can be entered multiple times.
So you could add on a map 3 cells and when all 3 are entered, something happens. Then when all 3 are entered again, the same thing happens again. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Tue Mar 03, 2015 4:31 pm Post subject:
Gluk seems to talk in ResHacker, IDA isn't even needed I'd take. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
In RA2/YR and probably TS, too, you have these:
0 - Single shot
1 - Unknown, but seems some AND relation
2 - Repeating
I can safely state that 0 does not mean OR, try it with local variables.
Besides that I strongly recommend anyone not to put time and effort in FinalSun or FinalAlert for that matter, because a new editor is in development.
Instead I recommend joining the ranks of people building it at the moment. _________________
In RA2/YR and probably TS, too, you have these:
0 - Single shot
1 - Unknown, but seems some AND relation
2 - Repeating
I can safely state that 0 does not mean OR, try it with local variables.
Besides that I strongly recommend anyone not to put time and effort in FinalSun or FinalAlert for that matter, because a new editor is in development.
Instead I recommend joining the ranks of people building it at the moment.
Hows the development of this new map editor going? FinalAlert does my head in, it's shit. I assume the new editor will properly support mods and maybe Ares #include logic? Last edited by dodgevipergts on Tue Mar 03, 2015 5:33 pm; edited 1 time in total QUICK_EDIT
I can safely state that 0 does not mean OR, try it with local variables.
It does. Make a trigger with for example event 48 Destroyed by anything and attach it to two buildings. With type 0 the event will be fired when only one of the buildings is destroyed, with type 1 both buildings need to be destroyed for the event to fire.
RP wrote:
Instead I recommend joining the ranks of people building it at the moment.
It does. Make a trigger with for example event 48 Destroyed by anything and attach it to two buildings. With type 0 the event will be fired when only one of the buildings is destroyed, with type 1 both buildings need to be destroyed for the event to fire.
Yes, that's what RA2 uses for sending Engineers after destroyed bridges, too.
But that's different from what I mean, you're pointing towards a single event. I'm pointing towards multiple events. If you have event 48, then 13 (time delay) the actions will fire after the delay specified in 13.
If you use type 0, if any unit dies with 48 attached, everything fires. If you use 0 for multiple events (in most cases) it follows the order of events, not fire the actions.
^Rampastein wrote:
The development process of this editor doesn't seem to be very transparent right now. I've only heard that a new map editor is in development (apparently by you), that's all. Where can I apply?
Oh, right. Hit me up with a PM. What's needed most at this point is rendering and GUI stuff. A huge chunk of the back-end is done.
The plan is to reveal it when some rendering is in, people always like to see nice things. _________________
If you use type 0, if any unit dies with 48 attached, everything fires. If you use 0 for multiple events (in most cases) it follows the order of events, not fire the actions.
RP, why do not you unite with zzattack? He also wanted to make is new editor. And as it has a huge working hours in the form of CNCMapsRenderer QUICK_EDIT
1. Unpack the archive.
2. Copy the executable file FinalAlert or FinalSun in this folder
3. Rename it to my.exe
4. Run Patch.bat
5. If all went well. You will get a new file called new.exe
RP, why do not you unite with zzattack? He also wanted to make is new editor. And as it has a huge working hours in the form of CNCMapsRenderer
That was the first thing I asked him, but he declined.
Though his renderer is very well made, it 'just' creates 'a picture', there's no editing what so ever.
It merely reads the files, gets the data and internally constructs a map render based on bitmaps. The only rendering in it is voxel rendering.
On topic:
Option 1 - AND one time isn't actually one time. In RA2 it repeats just like 2.
IIRC there was a discussion about this some years ago? I think it was LKO who started that discussion as well. _________________
Are you sure? If the Event is "13 Elapsed Time..." or "47 Elapsed Scenario Time...", will it really trigger more than once? _________________ QUICK_EDIT
In Red Alert 2's mission Operation: Fallout there is a TeamType of Soviet Engineers paradropped at the bridges when they are destroyed.
There is a trigger to check if the Engineers have all died. If so, a new TeamType is dropped.
I'm starting to feel confused about it now... I haven't really worked on a map in over a year. Let me take a deeper look at it. _________________
I used 1 already on a DTA map to make it bigger and show a text message when multiple cells are entered.
This logic works only one time. When i enter all the cells a second time, nothing happens.
So i'm pretty sure it works like in TD with 0 and 1 being only fired one time, 2 and 3 repeating.
Lin Kuei Ominae, you are 100% sure that these are all the options available for the repeating flag?
And all of these options work and have been tested?
If yes; I'll add them to the editor (TS version at first). _________________
I just tested it again and it seems i was wrong on
3 AND repeating
This doesn't work.
But 0 1 and 2 work as described.
Attached is my test map (for vanilla TS). Start on location 0 (top left) and move a unit on the cells left/right to the billboards.
In ALL11T, the team with Engineers is repeatedly dropped by plane. This is a trigger default enabled, attached to the TeamType. Every time the team dies, it is respawned. This makes the trigger type repeating-ish. _________________
using the testmap i can confirm it is not repeating.
It's only a one time AND in TS.
You have to move on both cells, the trigger fires, and then never again. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Then it must be something related to the TeamType's tag.
Makes sense that there's different behavior because you can only change ownership of a team using its script, not trigger action 14 (which usually is connected to something by a tag) _________________
I can change the owner of units and buildings via Action 14 just fine.
You just have to give the units and buildings the tag of the trigger.
Usually when recruiting a team, this team isn't tag-connected with the trigger. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I can change the owner of units and buildings via Action 14 just fine.
You just have to give the units and buildings the tag of the trigger.
Usually when recruiting a team, this team isn't tag-connected with the trigger.
You misread what I tried to say, or I wasn't clear...
What I meant is that when you have a TeamType with a tag attached to it, the map actions do not work. I've tested this with 14, no luck.
Triggers give more control over situations than a team's script, but unfortunately it did not work.
When using on normal map objects yes, it works _________________
Oh, you mean it's like a self-replicating trigger loop!?
Trigger using Type AND
Event->all Team member die (using the AND relation, since every unit has the Triggers tag attached when created)
Action->Create Team
So the trigger creating the team, checks if all team members died. If they died, the trigger fires and creates a team.
Hmm, that does indeed sound like repeating.
But on the other hand, the completely new created team, might also cause the trigger to reset. Else the new team wouldn't follow rules of the trigger. So for each new team, you basically have a new trigger too.
\Edit
I just tested a trigger attached to a created team to change the teams house. Doesn't work as you said.
I even tried
Trigger A -> creates team
Teams Tag : Trigger B
Trigger B -> change house (also had Action: "play text" to see if it fires)
didn't work as well, even though Trigger B fired and was independent from the team creating trigger. _________________ SHP Artist of Twisted Insurrection: Nod buildings
LKO, tested your map, so it confirms 0, 1, 2 cases as working and 3 case as not working.
Truncated Patch.bin file attached if anyone needs, to be used with Glukv48's resource replacement.
Teamtype being re-created after getting killed might be related to Annoyance=yes.
TS Missions nod8a.map, nod12a.map uses action 14 which has a Tag= in its teamtype's section.
TeamType had Annoyance=no.
As far as using trigger actions in TeamTypes go, I guess it's some difference in either TS/RA2 or has something to do with Ares if it works in YR by default. _________________
Since the first problem was fixed so nicely, could someone fix the following as well?
In FinalSun, the coordinates shown in the bottom right are in the wrong order. (see attached image)
Shown are 136 | 111 -0
But it should be 111 | 136 -0, since that is how the map stores the coordinates in the ini. First X then Y.
It's annoying confusing when editing the ini or using the Tunnel Maker and you constantly have to reverse the coordinates that you see in FinalSun.
While it's indeed reversed for Tubes, it's the other way around again for other other things such as waypoints.
So coordinates use different orders for different things in the map's code, which is indeed quite confusing and annoying to work with. _________________ QUICK_EDIT
Waypoints use an entirely different way to store them (just concatenated YYYXXX), since they are not comma separated values.
But for Buildings, Vehicles, Infantry and Tubes/Tunnels it's all X,Y
I wonder anyway how the game can discern waypoints when they have coordinates like
X 110 Y 10
which it just stores as
...=10110
which in turn can be either
X10 Y101
or
X110 Y10
I would also dare to say that no one ever edited waypoints in the ini, while it is pretty common to move/edit objects like buildings, vehicles and tunnels. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I would also dare to say that no one ever edited waypoints in the ini, while it is pretty common to move/edit objects like buildings, vehicles and tunnels.
Well, there is no map with tunnels, where you don't have to edit them due to the FinalSun tunnels bug and especially when adding more complex curved tunnels.
I also moved buildings, vehicles, infantry quite a few times when it was just about 1-2 cells, since it's faster to do in the ini, than waiting till FS has opened the map. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I wonder anyway how the game can discern waypoints when they have coordinates like
X 110 Y 10
which it just stores as
...=10110
which in turn can be either
X10 Y101
or
X110 Y10
I would also dare to say that no one ever edited waypoints in the ini, while it is pretty common to move/edit objects like buildings, vehicles and tunnels.
I have edited them in the INI, actually.
##=10110 can only mean Y10 X110.
Once you understand that the X coord is always 3 digits long (while the length of the Y coord varies), it's pretty obvious.
So ##=1011 can also only mean Y1 X011.
I personally wouldn't mind if X and Y would be swapped in FinalSun though, since there's indeed more things in the code that have X first. It'd be even better if FinalSun also showed X and Y before the numbers so that you can clearly see the order (you can then also never get confused about whether the hack to swap X and Y is applied or not). _________________ QUICK_EDIT
Would it be possible to also fix the way FinalSun generates tubes? When you draw a tunnel in FinalSun, it generates 2 lines (2 tubes) for them, but the first line the number of cells is always one too few and needs to be manually corrected in order to fix the tunnel.
FinalSun generates the code above for example (with a ton of useless extra, -1s at the end, but that's irrelevant) and as you can see, the number of 4s doesn't match the number of 0s.
So would it be possible to make a patch to make FinalSun correctly generate the tunnel as the code blow instead?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum