Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add precondition_power to all factions - Bugs report and detrimental impact #109

Open
MuadDibAKBorovos opened this issue May 19, 2020 · 3 comments

Comments

@MuadDibAKBorovos
Copy link

MuadDibAKBorovos commented May 19, 2020

I added precondition_power in [expansion_n] for all faction, including faction_neutral.ltx
It created a large number of new squads, moving from escape to garbage & it created this CTD when I was in another level:

! [LUA][ERROR] Insufficient smart_terrain jobs for smart with name 'esc_smart_terrain_5_4'.
! [LUA][ERROR] Abort(): [smart_terrain.se_smart_terrain:task]: [smart_terrain esc_smart_terrain_5_4] task: obj = sim_default_stalker_140350 job_path = nil, CLEARING. job_id = -1

FATAL ERROR

[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\priquel\sources\engine\xrServerEntities\script_engine.cpp
[error]Line : 180
[error]Description :
[error]Arguments : LUA error: ...r. - clear sky\gamedata\scripts\smart_terrain.script:307: [smart_terrain.se_smart_terrain:task]: [smart_terrain esc_smart_terrain_5_4] task: obj = sim_default_stalker_140350 job_path = nil, CLEARING. job_id = -1

stack trace:

Another bug, I did the same changes for faction_freedom.ltx. It created a lot of new squads in DV and in Military Warehouse.
By the way, when a freedom squad take the red_smart_terrain_4_2 smart terrain, they turned hostile as I'm enemy with Duty.

For information I used this values for faction_freedom.ltx:
`[expansion_4]
precondition_power = 0.5

[expansion_5]
precondition_power = 0.7

[expansion_6]
precondition_power = 0.8

[expansion_7]
precondition_power = 0.9

[expansion_8]
precondition_power = 0.99`

This values are too high. At the expansion_6, it's going crazy. Freedom are attacking neutrals to take the control of level changers in escape.
And it take too much time to pass to the next expansion step.

I'm testing value starting at 0.5 and with a step of 0.05 from expansion_4 to 7, and precondition_power = 0.9 for the last expasion. it looks better. I'll have to test it from the beginning of the faction war.

By the way, add a precondition_power to Freedom correct the bug "faction resource = 0" in the pda during all the war.

@Decane
Copy link
Owner

Decane commented May 19, 2020

For my own future reference - there are at least two legitimate, separate bugs reported in this issue:

  1. Crash with root cause:
Insufficient smart_terrain jobs for smart with name 'esc_smart_terrain_5_4'.

A search through my gulag_general logic dump for regex \[(walker|remark|kamp|patrol|cover)\d*@(follow|follower_)?esc_smart_terrain_5_4_[^t] suggests that esc_smart_terrain_5_4 supports only 4 smart terrain jobs. The maximum squad size in CS is 5. That is trouble. I suspect the crash is unrelated to precondition_power and is fully explained by the one absent smart terrain job, but I need to investigate more carefully to confirm.


  1. The logic in configs/scripts/red_forest/red_forest_gate_keepers_spawn_rest.ltx is bad; if either of red_stalker_gate_keepers_[12] becomes hostile to the player and a friendly faction (e.g. Freedom) captures red_smart_terrain_4_2, the friendly squad will instantly turn hostile to the player:
[logic]
active = sr_idle@spawn_allyes2

[sr_idle@spawn_allyes2]
on_info = {=is_squad_enemy_to_actor(red_stalker_gate_keepers_1)} %=set_gulag_relation_actor(red_smart_terrain_4_2:enemy)%
on_info2 = {=is_squad_enemy_to_actor(red_stalker_gate_keepers_2)} %=set_gulag_relation_actor(red_smart_terrain_4_2:enemy)%

@MuadDibAKBorovos

Freedom are attacking neutrals to take the control of level changers in escape.

I don't think that can happen in the SRP. Can you describe this "attacking" in more detail? There is a feature in the SRP that makes loners voluntarily move out of the way when Freedom wants to take a point if the player is a member of Freedom - are you sure this isn't what you were witnessing?

@MuadDibAKBorovos
Copy link
Author

That is trouble. I suspect the crash is unrelated to precondition_power
The precondition power only induce a very big quantity of squad & a lot of movement between smarties. Without it, I don't think a neutral squad go here. Squads are mainly using the way between level changers at the east of the road.
I checked the scene in LE, i saw the waypoint for the commander and the generic waypoint for the kamper scheme as in other smarties.

I don't think that can happen in the SRP. Can you describe this "attacking" in more detail? There is a feature in the SRP that makes loners voluntarily move out of the way when Freedom wants to take a point if the player is a member of Freedom - are you sure this isn't what you were witnessing?

You're right. It's not a real attack but it looks as it.
I'm not always looking the PDA map and I was in another level during it.
I saw than the two level changer at the south of garbage was controled by neutral.
Few minutes latter, it was full of freedomers.
Latter, freedomers was in escape. I supposed than freedomers killed neutrals because I didn't see neutral squad all around. But if you say they are moving, they propably returned in escape and die because of monsters or something else.
Just Freedom looks as invaders.

I continue my feedback about precondition_power. I reduce the value and load a save at the beginning of my war against Duty.
It's good regarding the respawn. But it isn't perfect.

Squads appears in base, it's fine. Some of them are moving to the main target and it's fine regarding war progress.
But a lot of them are staying in darvalley.
The result is strange, squads are using all smarties in DV. This is full of them.
So, I think it's hard to fine the good compromise to have enough resources and a good distribution of squads in different levels. Precondition_power have to be completed with smarties as target condition.

@Decane
Copy link
Owner

Decane commented Jun 28, 2020

@MuadDibAKBorovos Do you have a save from which to reproduce the crash? I checked the job table for esc_smart_terrain_5_4 and it supports at least 5 jobs of each type, so as long as you've not modded the maximum squad size to >5, you shouldn't get a crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants