You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by HockeySam18

Hop to:    
Welcome! You are not logged in. Please Login or Register.3 replies
Age of Kings Heaven » Forums » Scenario Design and Discussion » Unit type/object group trigger condition
Bottom
Topic Subject:Unit type/object group trigger condition
sandsmark
Squire
posted 07-08-19 12:21 PM CT (US)         
Hi!

I'm re-implementing the genie engine (just trying to get AoC playable for now, though), and I just started implementing scenario support.

I chose to start by making the Montezuma campaign work (since that's what is included in the trial version and that is easier to get for most people). But the first scenario there (C3_Montezuma_1.scx) has a weird condition for a trigger, so got kind of stuck immediately.


It is supposed to be a condition for when the player has collected 4 relics, but AoKTS thinks it means that the player needs to have 4 boars:



In AGE what I thought was the same variable is called "Combat Level" (0 = Other, 1 = Base, 2 = Building, 3 = Civilian, 4 = Soldier, 5 = Priest), but looking at AoKTS it seems to interpret it differently, and what AGE calls "Base" it calls "Boar".


For reference, here is the log output from my own code, I use genieutils as well (same as AGE), so that's why it shows it as "Base":




Anyone have any idea how this trigger condition is supposed to be interpreted, or work?
AuthorReplies:
Kataphraktoi
Squire
posted 07-10-19 10:24 AM CT (US)     1 / 3       
Woah, fascinating! I dont have the time to load it up myself, but how is the performance looking? Is it multithreaded? If we could have say 3000-5000 units moving around the map no issue that would be quite interesting...as is AoC just runs into a software bottleneck unable to use any more CPU. (I have a locked i5 at 3.4 ghz and an i7 clocked at 4.4ghz same generation, and there is no improvement whatsoever using the i7 system when scenarios lag)

"Excellent could be any map that has the quality of a ES random map or ES scenario. AoK is an excellent, award winning game. That's where I'd start." -AnastasiaKafka

"Hard work is evil. Bitmaps are stupid. Working on a scenario for more than one afternoon is stupid. Triggers are stupid. Testing your own scenario is stupid. The world is stupid. You are the Greatest." -Ingo Van Thiel
BF_Tanks
Squire
posted 07-11-19 01:50 PM CT (US)     2 / 3       
I look forward to your implementation of Triggers, and how differently you handle it from the original.

I highly suggest you implement UserPatch's features as native triggers.

Unfortunately I don't know dick about the game's underlying handling of triggers, only how they work in-game.

Proud Member of Black Forest Studios
Co-creator of Silent Evil - Voted Best Multiplayer Scenario of 2009
and The Seas of Egressa - Voted Best Multiplayer Scenario of 2010

[This message has been edited by BF_Tanks (edited 07-11-2019 @ 01:54 PM).]

sandsmark
Squire
posted 07-19-19 08:56 AM CT (US)     3 / 3       
Woah, fascinating! I dont have the time to load it up myself, but how is the performance looking? Is it multithreaded? If we could have say 3000-5000 units moving around the map no issue that would be quite interesting...as is AoC just runs into a software bottleneck unable to use any more CPU. (I have a locked i5 at 3.4 ghz and an i7 clocked at 4.4ghz same generation, and there is no improvement whatsoever using the i7 system when scenarios lag)
I haven't really focused that much on performance so far, except when I get bored with the "normal" stuff. I usually prefer to get stuff working, get the code pretty and then pull out a profiler and improve the performance. But the performance is one of the reasons I started basically from scratch. I tried contributing to openage (to fix the performance initially), but their whole architecture is too complex for me to understand, and pretty heavy.

And I don't thread anything so far, but the most CPU intensive at this point is the pathfinding and that should be almost trivial to move into threads. And it feels like the original doesn't finish calculating the path in the same frame as you click, so the behavior should be the same even if I do it in separate threads, even if the original probably just iterates in over several frames.
I look forward to your implementation of Triggers, and how differently you handle it from the original.

I highly suggest you implement UserPatch's features as native triggers.

Unfortunately I don't know dick about the game's underlying handling of triggers, only how they work in-game.
I aim to implement everything as identical as possible to the original (with userpatch, especially wrt. the extra AI stuff).

And I don't really know dick about how the original's handling under the hood either, the most interesting for me is just looking at how it works as a player, and try to replicate that. And since I hadn't really played it in over ten years when I started on this, a lot of it is based on theviper's youtube channel (especially his campaign playthroughs).

So basically my process is; watch some youtube videos, open AGE and AOKTS and look at how the data files look, and then implement it.



But back to my original question; I had completely overlooked the Victory tab in AOKTS... and the ScnVictory class in genieutils/AGE (which represent the same thing). There's a victory condition there that is 'X number of relics captured' which is used in the scenario. So sorry for the noise and dumb question. :-)

But I _also_ found some data in the data files that neither AGE nor AOKTS knew what was (so basically noone knew, I guess), which turned out to be winning conditions per player, as opposed to only for the human player which is what AOKTS and AGE knew about.

Here's the data structure in case anyone's interested: https://github.com/sandsmark/genieutils/blob/master/include/genie/script/scn/ScnPlayerData.h#L297-L327

And here's how I ended up using it: https://github.com/sandsmark/freeaoe/blob/master/src/mechanics/ScenarioController.cpp#L205-L244
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames