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

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Additional Trigger Effects in v1.4
« Previous Page  1 2  Next Page »
posted 08-08-14 02:33 AM CT (US)   
Hi! Just wanted to let everyone know about the following scenario editor updates to UserPatch v1.4 (a critical gameplay bug was discovered that was carried over from v1.0c, which required a new update, so a few things were added with the fix lol). They're intended to be low impact changes to avoid crashing previous versions of the game, so no actually "new" effects have been added this time. Instead, several existing effects have been extended with additional functionality (the "Number" field was added on the right side of several effects), so you can now heal objects, directly "set" HP and attack, snap the view without scrolling, etc.

To add support for the new features, Trigger Studio developers can find the "Number" field stored at the same offset as it is in effects like "Display Instructions" and "Clear Instructions". Scenarios should still load without issue in existing versions of Trigger Studio. No additional effects are planned, as UP v1.4 is scheduled to be finalized within 2 months if no critical bugs are found. You can find the latest version here (currently UserPatch.v1.4.20140809-000000). Thanks to JustTesting/randomdude and Basse for feedback!

Scenario Editor Updates
- Setup objects with the Create Object effect: set Number to 1 for enable unit, 2 for disable unit (root units only).
- Setup techs with the Research Technology effect: set Number to 1 for enable tech, 2 for disable tech.
- Snap the view with the Change View effect: set Number to 1 for snap.
- Change Object HP and Attack can now "set" a value: set Number to 1.
- Heal units with the Change Object HP effect: set Number to 2.
- Activating or deactivating invalid triggers will notify you instead of crash.

Previous Fixes from UP v1.4
- Trigger elements are named and prefixed: C (condition), R (reverse condition), or E (effect).
- Fixed trigger corruption when attempting to select more than 25 units for a patrol effect.
- The Set Objects button will perform changes more reliably, avoiding unintentional deselection.
- Objects in the "Others" category will not be reset when returning to a trigger.

Previous Fixes from UP v1.3
- Press "Ctrl+S" once to disable grid placement of non-building objects.
- Enable free placement of all objects by pressing "Ctrl+S" a second time.
- Fill new maps or modify existing maps with any available terrain.
- Create maps using custom rms scripts directly in the scenario editor.
- Trees, mines, and more are now properly replicated by the map copy feature.
- Change the names of units in a specific area, without having to preselect.
- Use negative numbers more freely with trigger conditions and effects.
- New reverse condition checkbox to invert your scenario trigger conditions.
- Area selection options for the patrol effect and the fewer-objects condition.
- Change object speed, range, and armor with new trigger effects.

A more complete list of updates in v1.4 can be found here.

[This message has been edited by scripter64 (edited 08-08-2014 @ 02:55 AM).]

Replies:
posted 08-11-14 06:51 PM CT (US)     36 / 61  
Also, Scripter, is it possible to edit things so that opening the chat interface shows the entirety of all recent (a number within reason) chats/display instructions dialogues or so? Sometimes I'm playing a scenario, the dialogue flies by way too fast, and I open the chat window to read it again, only to see part of it cut off because the chat interface cuts off the last quarter of it or so.

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 08-11-14 09:35 PM CT (US)     37 / 61  
John, your post reminded to check into the possibility for units with both base melee + base pierce attack, thanks! There are very few of these, but it was important to handle that case. About your question, the displayed value first looks at attack classes 3 and 4 and takes the highest value. If both are 0, it tries to find another. Various parts of the game code assume that attacking units have at least a 3 or a 4 class attack. Units with both 3 and 4 will be heavier for the game to process, so ES did this rarely (only like 3 units).

HockeySam, the chat history stores about 50 lines at max. After that, it loops around and starts to overwrite the oldest lines. This probably can't be changed, I'm sorry. There were some bugs in v1.0c that caused the chat history to become corrupted and overwrite the wrong lines, but these should be mostly fixed in v1.4.
UserPatch v1.4 RC has been released (20140812-000000)! This update ensures that setting attack with Change Object Attack + Number:1 will work as expected for those rare units with both base melee (4) and base pierce (3) attack classes. If you look on the A.G.E. attack list, the bottom most attack class between 3 and 4 will be "set" to the requested value and the upper most will be "set" to 0 (this is usually 0 already). In this way, both values aren't being set, so the attack isn't doubled for these units. The original behavior for Change Object Attack + Number:0 is left as-is. Thanks to John the Late for the idea!
Please update here: UserPatch.v1.4.20140812-000000. I think it should all be proper now, so we'll try to hold at this version to ensure that it's stable before a more public release.

[This message has been edited by scripter64 (edited 08-11-2014 @ 10:28 PM).]

posted 08-11-14 10:32 PM CT (US)     38 / 61  
Sorry, I was unclear. I meant that if a line of dialogue via the "Display Instructions" effect was too long, then a quarter or so of the text in the chat interface would be cut off by an ellipsis (...), even if it was the most recent entry in the chat. The fix that I was hoping for is that of the 50 lines that the chat stores before overwriting, those stored would not be cut off at all by an ellipsis, allowing the player to read an entire line of dialogue through the chat interface even if it took up the full three onscreen lines allotted to each display instructions slot.

In case the above explanation is too confusing:

Say I wrote this line in a "Display Instructions" effect:

"The brave knights traveled all throughout the land, protecting pilgrims and merchants, commoners and lords alike. They made it their mission to bring peace, safety, and order to the realm, and bravely stood up to all evildoers that threatened those unable to defend themselves."

Onscreen, I could see the entire line, but if it went by too fast and I wanted to look it up again in the chat interface, then this is what I would read through the chat interface (assuming the length of the line in the display instructions effect was long enough to be truncated by the chat) :

"The brave knights traveled all throughout the land, protecting pilgrims and merchants, commoners and lords alike. They made it their mission to bring peace, safety, and order to the realm, and bravely stood up...

So essentially, the last quarter of the line would be missing. The fix I was hoping for was to be able to read the entire line through the chat interface no matter the size (the size in a display instructions effect is limited, so you could use the same character limit), not a truncated version.


Another question/issue I have to report is that some units, and techs are missing from the disable list in the editor, meaning that you can only disable certain units and techs for each player. Would it be possible to make the full unit and tech lists available for disabling in that section? If not, then I can always use triggers (now that you included the disabling option), but it would nonetheless be cool if this was possible.

Thanks for reading all of my stuff so far- cheers!

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 08-11-14 10:34 PM CT (US)     39 / 61  
Oh, that's by design, as the length of stored text in the history list cannot exceed a certain length. This is actually the cause for various crashes in localized campaigns on the HD edition (german translations in William Wallace #6, for example). ES didn't set any cap for these lines, so they would overflow the buffer and crash the game. It would be best for scenario designers to aim for no more than 200 characters per line of text to remain within the limit and avoid truncation in the history log (it won't crash on v1.4 anymore, but for player experience, it's best to avoid truncation). As for the disables, that probably can't be expanded. Sorry for the trouble, Sam.

[This message has been edited by scripter64 (edited 08-11-2014 @ 10:57 PM).]

posted 08-11-14 11:13 PM CT (US)     40 / 61  
No worries Scripter- thanks for the detailed replies, and all of the hard work you've continued to put into this game!

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 08-12-14 00:32 AM CT (US)     41 / 61  
John, your post reminded to check into the possibility for units with both base melee + base pierce attack, thanks! There are very few of these, but it was important to handle that case. [...] Various parts of the game code assume that attacking units have at least a 3 or a 4 class attack. Units with both 3 and 4 will be heavier for the game to process, so ES did this rarely (only like 3 units).
I can only think of 2: Galleys and Chu Ko Nus. What is number 3?
About your question, the displayed value first looks at attack classes 3 and 4 and takes the highest value. If both are 0, it tries to find another.
How does this work? I tried to have a unit with a new base attack class that is neither 3 nor 4. Setting them to a different value than the displayed attack leads to this. Sorry for the questions.
posted 08-12-14 01:04 AM CT (US)     42 / 61  
Scorpions also have both attack classes, so I think it's scorpions, chukonus, and fireships. About the display, I forgot to mention that if both classes are missing, it cannot properly figure out which to display, so it goes with 0. The display then calculates that to reach 0 from the 12 displayed attack, the attack is 12-12. These details were hidden in v1.0c, since it couldn't display negative attack adjustments. It's important for a unit that attacks to have a base 3 or 4 attack class, as various things are written with this expectation.

[This message has been edited by scripter64 (edited 08-12-2014 @ 01:21 AM).]

posted 08-13-14 08:45 PM CT (US)     43 / 61  
Thanks for the details. What confused me was the
If both are 0, it tries to find another.
because I didn't find a way to make the unit actually find another class to use as displayed value. Is it possible to have anything other than 3 and 4 displayed?
posted 08-14-14 00:59 AM CT (US)     44 / 61  
Oh, I miswrote that previous comment, I'm sorry. The other attack types are considered later on in the process for actual attack, I mean, but not for display. It's possible to add them into the code that is used for display (and other purposes), but it would add a fair amount of overhead to all unit processing for the benefit of those few rare units. It probably wouldn't be worth it for performance overall, I think.

[This message has been edited by scripter64 (edited 08-14-2014 @ 01:02 AM).]

posted 08-14-14 08:54 PM CT (US)     45 / 61  
A suggestion: with the trigger system version (currently as 1.6), there should be a new version 1.7 that helps scenario designers with compatibility and at the same time the conditions/effects order should be removed.

I have seen many other little features that could be fixed in the game engine whilst decoding the scenario format.

In the section where it reads objects, the engine internally changes some of the object settings according to their object-constant; this is not handy to have especially for modding where previous objects are modified or replaced externally (from DAT). The engine seems to change their position or constants according to the constant read by the scenario.

GENIE-STUDIO (manipulate Genie-Engine files with JSON)
posted 08-15-14 09:55 AM CT (US)     46 / 61  
Hi AOHH! A new version id has some benefits, but there's also a few problems. For example, if you make a scenario in UP v1.4 right now, but choose not to use any of the new effects, the scenario will work just fine in v1.0c, as well. If the version id was changed, v1.0c might not be able to handle the unexpected version properly. I'm sorry for the trouble!
UserPatch v1.4 RC has been released (20140815-000000)! This update fixes a critical crash bug that can occur in games played on certain maps with mods and AIs. Separately, the game will now insert the map seed value 12 bytes from the end of all multiplayer rec files, within the post-game achievements lobby data block, so rec analyst apps can display it. If you replicate the settings in the scenario editor, you can now recreate the game.

In addition, the scenario editor will now properly handle starting age and civ changes, so objects won't appear from the wrong age when opening a scenario, etc. As before in v1.0c, if you switch civs or starting age several times in a row, your buildings may appear damaged or on fire in the scenario editor, but that's just the way HP is calculated by the editor. It has no effect on the actual scenario, but if you'd like to put out the flames, just save/reload or test/return. Finally, the issue with mayan and chinese villager placement when generating a map in the scenario editor has been fixed, as well. Thanks to ryshep for the crash report, 9mil on aoczone for the seed idea, and LightTree for the villager placement report!
Please update here: UserPatch.v1.4.20140815-080000

[This message has been edited by scripter64 (edited 08-15-2014 @ 11:18 AM).]

posted 08-15-14 05:43 PM CT (US)     47 / 61  
As always, thanks for your work.
Talkign about the Scenario Editor: Do you think it is possible for the scenario editor to take the diplomacy tab into account when creating maps that generate depending on teams? (Like Team Islands, Black Forest or Lombardia, to name some.)
posted 08-15-14 06:09 PM CT (US)     48 / 61  
I think the diplomacy controls should work, but you may need to save/reload or test/return to commit the diplomacy changes. After that, the generated maps will see the team setup. I can't remember if you have to enable the allied victory box for all players, as well. Congratulations on your green
posted 08-15-14 06:10 PM CT (US)     49 / 61  
Oh, that's interesting! I thought there was no way to actually generate working maps of these kinds, thanks for the info! (I never tried save/reload or the like, I guess...)

And thanks!
posted 08-16-14 11:32 AM CT (US)     50 / 61  
UserPatch v1.4 RC has been released (20140816-000000)! This update fixes an issue with the Goths in imperial or post-imperial in the scenario editor, where their defined population cap may increase by 10 after each test. In addition, the player object lists where you can choose the units to place on the map are no longer limited by the currently selected starting age. In other words, if a player is set to Imperial Age start, you'll still be able to place Archer-base units. Although they'll still appear upgraded to the current age, internally they will still be Archer units at the core, so if you change the starting age to Dark Age later, they'll return to looking like basic archers instead of arbalests, etc.
Please update here: UserPatch.v1.4.20140816-000000
posted 08-16-14 11:58 AM CT (US)     51 / 61  
thats great! good job
posted 08-17-14 09:22 AM CT (US)     52 / 61  
Wow, that Goth thing was really annoying at times! I used to have a mod with houses giving +5 bonus population and after every scenario test, the pop limit skyrocketed! Thanks a lot.
posted 08-17-14 11:30 AM CT (US)     53 / 61  
That's a really nice set of additions

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 08-17-14 12:36 PM CT (US)     54 / 61  
UserPatch v1.4 RC has been released (20140818-000000)! This update adjusts the basic anti-cheat system to prevent message flooding in scenarios with change diplomacy effects. In addition, the Stop Unit effect now accepts a Number between 1 and 9 for assigning player Ctrl hotkey groups. Thanks to danielpr for the diplomacy report!
Please update here: UserPatch.v1.4.20140818-000000. Thank you for feedback!
posted 08-20-14 02:59 PM CT (US)     55 / 61  
UserPatch v1.4 RC has been released (20140820-000000)! This update adjusts the Ctrl+group selection effect with Stop Unit+Number:1-9, so that it will no longer allow invalid objects below "living object" category 70 into the selection list. However, scenario designers must still ensure that invalid combinations of units are not selected (units + buildings, etc.), as the trigger can't account for all possible weird combinations of selected objects. You can take advantage of the "Object Type" dropdown when making non-specific area selections to restrict the selection to Building, Civilian, or Military category units.
Please update here: UserPatch.v1.4.20140820-000000

[This message has been edited by scripter64 (edited 08-20-2014 @ 03:00 PM).]

posted 08-22-14 05:58 AM CT (US)     56 / 61  
UserPatch v1.4 RC has been released (20140822-000000)! This update fixes an issue with the Display Instructions effect, where the game may crash if the Sound resource string is somehow null. This seems to occur more often with externally edited scenarios (maybe from trigger studio), but it's unfortunately common.
Please update here: UserPatch.v1.4.20140822-000000
posted 08-22-14 07:51 AM CT (US)     57 / 61  
Thanks Scripter

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 08-22-14 08:34 AM CT (US)     58 / 61  
The diplomacy error was quite a problem. Thanks for fixing this!
posted 04-06-15 12:15 PM CT (US)     59 / 61  
Posting this here, as I'm not sure where else it would fit:

There seems to be a difference between 1.0c and UP that affects a scenario that myself and a few other folks are designing. There is a sidequest where a group of villagers (controlled by an allied player) are continually tasked to a spearman (controlled by the human player) so the villagers follow the spearman when the human player moves him. In 1.0c, the villagers follow the spearman no matter what, but in UP, they stop moving and do not follow the spearman until he has stopped moving as well. Do you have any idea what accounts for this difference?

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 04-07-15 03:36 AM CT (US)     60 / 61  
Hi! Behavior seems identical to me in both versions: http://www.files.com/shared/552395d0ed05d/move-test.zip

The villagers are stop-and-go in both versions unless the target stops moving. I tested a variation of the scenario with allied villagers and got the same result. No changes have been made to this trigger effect, so if there is a difference, it may be caused by something else, like the AI settings for the ally or the timing of the trigger.

If the ally is an AI, you could get better results without stop-and-go by moving them directly within the AI script:

(defrule
(up-timer-status 1 != timer-running)
=>
(set-strategic-number sn-focus-player-number 1) ;player with the spearman
(up-reset-search 1 1 1 1)
(up-reset-filters)
(up-find-local c: villager-class c: 40) ;find AI's villagers (might need to use filters to narrow it down if there are many)
(up-find-remote c: spearman c: 1) ;find ally spearman (might need to use filters to narrow it down if there are many)
(up-target-objects 0 action-move -1 -1) ;set the villagers to follow the spearman
(enable-timer 1 3) ;repeat this every 3 seconds
)

Be sure to set the AI's gathering sns, etc. appropriately to disable their activity and avoid automatic retasking.

[This message has been edited by scripter64 (edited 04-07-2015 @ 04:30 AM).]

posted 04-07-15 10:48 AM CT (US)     61 / 61  
I guess we'll have to find a workaround. We'd try the AI trick but the scenario needs to be compatible with 1.0c (without UP) as well.

Thanks for the quick reply!

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
« Previous Page  1 2  Next Page »
Age of Kings Heaven » Forums » Scenario Design and Discussion » Additional Trigger Effects in v1.4
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames