Hex of Steel

Hex of Steel

Hex of Steel - Workshop
You can share your maps, campaigns, graphics, or any other mod here.
了解更多
0t0 1 2024 年 5 月 22 日 上午 10:27
Event triggers and actions
Hi Val,

again me with question about editor. Could not test them all so I try to get your feedback/explanations.
There is one trigger called "on unit destroyed" with field to enter number. I guess this is sort of counter and after side you pick lose let say 20 units it will trigger event action. Right?
If you use another one, do you have to make bigger counter so it triggers after first one or they can work in the loops somehow, like first one rest counting and then another starts from moment first one happen?

Then about actions to add money to one side. we have few options:
a) set fixed income
is this one like income from tiles, it improves your base income or it is treated as extra? Asking this as it is linked to other two actions with percentage

b) set fixed income (%). I guess it is % of base without extra like one above. Or am I wrong and this percent will affect all sources of income?

c) set fixed income based on turn income (%), hm I guess this one take in account all your income, base and extra received via events. But what is difference between this one and previous one?

d) add/remove fixed income, this one should be similar to first one so I'm not sure how they are different.

I probably need explanation on what is fixed income. is it same as base or something that is extra on top of base. Under base I consider income from cities, factories, etc.

Also do policies affect only tile income or also what you receive through events like this fixed income increments?

And finally is there any way to make one event repeatable or you have to make for every turn you want this copy of same event. Asking this as all triggers are binary so to say, linked to one moment in the game. Asking this as I want to make event that gives unit every 3 turns for example, but without making 20 such events!

Uh, sorry to bother you with this but need help with my scenario. Thanks in advance.
< >
正在显示第 1 - 14 条,共 14 条留言
A Corsican Frog  [开发者] 15 2024 年 5 月 23 日 上午 1:30 
Hello,

1) On Unit Destroyed. This is to be used for a very specific unit. It isn't a unit counter. The field takes in a unit ID (unique). I was about to say the tooltip explains you this, but for some reason this particular tooltip says 'no translation. So I'm fixing that now.
You can get the unit's ID by left clicking on it when it is on the map in the editor (fingerprint icon indicates the field + tooltip)

2) Set fixed income sets fixed income. When you open the scenario's setting, you have a field that says 'fixed income'. This fixed income is as it says 'fixed' and simply is X amount of money that will be added on top of regular income every turn. This should be used to balance scenarios in a fast way, without needing to go over all victory points on the map. If after you made your map the Germans are missing 500 income per turn, you can just write 500 in the fixed income field and they will have their regular turn income + 500. This obviously does not get modified in ANY way, otherwise there would be no point in entering something there. So, no policies, no difficulty, no nothing. If you say it is 500, it is 500, it will remain the same.

3) Set fixed income % will set the fixed income to be a % of the current fixed income. You should enter a number from 0 to 100, as it is a percentage. If your current fixed income is set to 1000, if you execute this event with a value of 25 (%), it will set the fixed income to be 1000 * 0.25 = 250

4) Set fixed income based on turn income % sets the fixed income to be a % of the player's turn income. If the player is making 1000, and you set this event value to be 10 (%), then the fixed income value calculated will be 1000 * 0.1 = 100
This is applied on the regular turn income, not taking into account the fixed income. So if the player is making 1500 a turn (but 500 comes from fixed income) then it will be calculated only on the 1000, without taking into account the 500 from fixed income, which would be breaking the calculations

5) Add / Remove fixed income does what it says. It will add any number you set in that field. So if it is -500 it will remove 500 from the fixed income you originally had. It can take both negative or positive numbers.


And yes you have a 'executions' and 'chance' field. Which do what they say, chance being the % of chance the event actions will execute when even is triggered (0-100%)

And executions is the amount of times the event can be triggered.

Obviously, for one shot trigger, they will not be able to trigger more than once, but this is common sense (Example: On Unit Destroyed, since it uses a unique ID well you cannot have it run more than once)
0t0 1 2024 年 5 月 23 日 上午 9:49 
Hi, thanks for explanations, very helpful.

Just to summarize for myself or any other soul searching for clarity on how income is build up:

total income = base (tiles like cities and factories)(1) + fixed income (2) + other income (conquest, gifts from allies, etc.) - upkeep

(1) - adjusted by policies and Set fixed income based on turn income % modifier
(2) - adjusted by Set fixed income % and Add / Remove fixed income, these are not affected by policies

About event trigger unit destroyed, now I know how it works, but is there any way with today options to check status of army size (and losses) and to make some actions after certain number is reached?
A Corsican Frog  [开发者] 15 2024 年 5 月 23 日 下午 12:18 
引用自 0t0
Hi, thanks for explanations, very helpful.

Just to summarize for myself or any other soul searching for clarity on how income is build up:

total income = base (tiles like cities and factories)(1) + fixed income (2) + other income (conquest, gifts from allies, etc.) - upkeep

(1) - adjusted by policies and Set fixed income based on turn income % modifier
(2) - adjusted by Set fixed income % and Add / Remove fixed income, these are not affected by policies

About event trigger unit destroyed, now I know how it works, but is there any way with today options to check status of army size (and losses) and to make some actions after certain number is reached?
Very good summary!

No, events are not in any way capable to be triggered based on those parameters for the time being

I think I will add 2 additional triggers soon: Income > X and Income < X

This should help for some cases (checking the 'health' of a country)
最后由 A Corsican Frog 编辑于; 2024 年 5 月 23 日 下午 12:19
0t0 1 2024 年 5 月 23 日 下午 12:45 
引用自 A Corsican Frog

I think I will add 2 additional triggers soon: Income > X and Income < X

This should help for some cases (checking the 'health' of a country)

Yes this will do the trick as with time AI is investing a lot in new troops and then it start to suffocate as no enough money to maintain all army in healthy state.
Perfect, thanks.
A Corsican Frog  [开发者] 15 2024 年 5 月 24 日 上午 1:14 
引用自 0t0
引用自 A Corsican Frog

I think I will add 2 additional triggers soon: Income > X and Income < X

This should help for some cases (checking the 'health' of a country)

Yes this will do the trick as with time AI is investing a lot in new troops and then it start to suffocate as no enough money to maintain all army in healthy state.
Perfect, thanks.
Yes

Will implement within next few days, I got a busy weekend coming up... (IRL)
0t0 1 2024 年 5 月 25 日 上午 3:34 
I think someone was asking about income and confusion on where money comes. Maybe gifts from allies caused spike and you have no chance to see it in breakdown.
I have to admit it would be nice to see when hover with mouse over income to see this split like how much is regular income and how much is fixed and in case that turn you get some extra from conquest or from gifts.
This way you can better judge is it worth investing in policies as maybe regular income is not that high and you will get less to what you expected.
A Corsican Frog  [开发者] 15 2024 年 5 月 25 日 上午 4:17 
Gifts from allies totally can cause these spikes

I cannot show it in any way as it isn't being tracked
Nothing is, as a matter of fact
I only have a single function called 'AddMoney()' and this is tracked, but there is no 'source' or 'context'

I am not planning on implementing anything alike
0t0 1 2024 年 5 月 25 日 上午 5:01 
ok, no stress, this would be anyway extra, sort of nice to have thing!
0t0 1 2024 年 5 月 26 日 上午 2:47 
Again about events and triggers, I have tried to make something like simulation of logistic problems Germans experienced in 1941 by setting negative fix income as they move beyond some VP and then compensating it with positive fixed income after they secure important transport hub. I think with present options it is ok it works as long it is one directional. I explain. when German troops advance it all works fine but when Soviets start regaining those hubs nothing is happening, bonus for Germans still remain.
Is there any way to grant fixed bonus to side that control VP. I'm talking about fixed income irrespective of gain from that tile itself.
This would be neutral trigger event where controller of the tile gets income fixed bonus.
A Corsican Frog  [开发者] 15 2024 年 5 月 26 日 上午 5:21 
No, it is one sided unfortunately, once it fired, it fired

You cannot have it check who took captured the VP, at least not now

That is why the 'don't fire before' conditions were implemented recently
0t0 1 2024 年 5 月 31 日 上午 7:27 
Hi Val,

I hope it is ok to put it here.
I was running more test on my scenario for east front map.
Played myself on soviet side.
Not sure if you have seen but I tried to simulate confusion and unpreparedness of soviet side by reducing per turn income.
I made this using Set fixed income based on turn income %.
it starts with -74% and then with time it goes gradually up (or malus get smaller).
Soviet base is 10580 (or close to it) and initial few turns this is about 2750 base with minus unit upkeep this is less then 1000 netto per turn.
On turn 8 Set fixed income based on turn income % changes to -70%.
with this it slightly improve situation raising base to 3174 and netto is variable depending how many units are lost in these 8 turns (and it is a lot :)...but about 1500 netto.
At this point I selected war economy that gives 15% increase in per turn earning. My netto sudenly jumps to approx 3250. I could not get right calculation for this. Following what we discussed, Set fixed income based on turn income % shall be calculated like base x policies bonus (in this case 1.15) x Set fixed income based on turn income % (in this case 0.3) right?
With this formula it would be:
10580x1.15x0.3= 3650, but instead my base was showing me 4656!!
Only way to get this value is like this:
10580x0.3 + (10580x1.15-10580) = 3174 + (12167-10580) = 3174 + 1587 = 4761
Variable here is some villages and towns being lost.
But in general this is not how it should be right?
And confirmation for this came on turn 20.
At this turn there is new change in Set fixed income based on turn income % that is now -65%.
So if we follow all above I should get more money as in formulas instead of 0.3 I use 0.35. But alas I get less money as now formula was reset and it follows expected one:
10580 x 1.15 x 0.35 = 4258 and this is like 500 less then before!
I would expect that no matter when you introduce policies you will get output as per above formula where policies multiplier is multiplied with other benefits/maluses and all this is applied to base value.
Would be good you can look into this please.
A Corsican Frog  [开发者] 15 2024 年 5 月 31 日 下午 1:56 
Yes it is, it's related, more or less :)

Alright so that's a lot of text and numbers, and I am not sure I understand the issue

I would like to share with you the code used: https://imgur.com/a/QBl5dFm

it should be transparent enough so that a non initiate can still understand what's going on

What I can tell, from what I read, is that any policy is taken into account, when applying the fixed income with % turn income

So, if you are having the +15% income policy, the calculated value of the fixed income will take it into account
0t0 1 2024 年 6 月 3 日 上午 8:50 
I'm not expert for coding so have some trouble to understand all what you sent but judging by what is written in section about Set fixed income based on turn income % it looks right;
base is multiplied by value in editor (I guess this is (int)) and then it is further multiplied by value from event and then divided by 100.
I also explain that after even value changed everything gets as it should but by that moment I was getting more credits.
How often this formula is in place? I mean is it updated only when some of the values are updated or it is calculated every turn?

I mean, it is no big deal and you can ignore this issue.
A Corsican Frog  [开发者] 15 2024 年 6 月 3 日 下午 2:33 
引用自 0t0
I'm not expert for coding so have some trouble to understand all what you sent but judging by what is written in section about Set fixed income based on turn income % it looks right;
base is multiplied by value in editor (I guess this is (int)) and then it is further multiplied by value from event and then divided by 100.
I also explain that after even value changed everything gets as it should but by that moment I was getting more credits.
How often this formula is in place? I mean is it updated only when some of the values are updated or it is calculated every turn?

I mean, it is no big deal and you can ignore this issue.
This bit of code you see here is the code that runs when the event action is triggered
So it runs once, at the moment of the trigger
< >
正在显示第 1 - 14 条,共 14 条留言
每页显示数: 1530 50