Anonymous Login
2021-09-29 01:15 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001906OpenClonkObjectspublic2017-10-27 16:54
Assigned ToK-Pone 
Product Version 
Target Version8.0Fixed in Version8.0 
Summary0001906: Last man standing keeps creating new Rule_Relaunch objects
DescriptionIf you place the Last man standing rule in your scenario, it will also create Rule_Relaunch if it didnt exist already. But if you save the scenario and load it again, it will create a new one so after a few sessions you have like 10 Rule_Relaunchs in your Objects.c which makes it impossible to edit the settings of the relaunch rule since the new one is one that seems to have impact on the game.
Additional InformationMaybe relevant:

return FindObject(Find_ID(Rule_Relaunch)) || CreateObject(Rule_Relaunch);
TagsNo tags attached.
Attached Files




Fulgen (reporter)

The LastManStanding rule itself only creates Rule_Relaunch if it isn't present and the player wins a relaunch by killing other players. But even then the condition to create the rule shouldn't fail...


Maikel (developer)

There is no last man standing rule.

The goal does not seem to involve the relaunch rule. So where is the problem exactly?


Maikel (developer)

Okay, I see the problem now. Scenario saving of the relaunch rule should check if it is not already created and also some of the properties do not seem to be saved at the moment.


Clonkonaut (developer)

Can someone explain to me, why Rule_Relaunch gets created when I place the last man standing goal in the editor? I don't get how that works.


K-Pone (developer)

@Clonkonaut Rule_Relaunch is created because Scoreboard_Relaunch calls it in its Initialize() function.

As stated in the Additional Information field, the function GetRelaunchRule() creates the relaunch rule when being called and it has not been created yet.

I just found this out by adding a LogCallStack() to Rule_Relaunch's Initialize().

Came up with this:
 by: Object(19)->Initialize() (ot.ocs\System.ocg\rl.c:6)
 by: Object(18)->GetRelaunchRule() (Objects.ocd\Rules.ocd\Relaunch.ocd\Script.c:405)
 by: Object(18)->Initialize() (Objects.ocd\Libraries.ocd\Scoreboard.ocd\Relaunch.ocd\Script.c:19)
 by: Object(18)->Initialize() (Objects.ocd\Goals.ocd\LastManStanding.ocd\Script.c:28)


K-Pone (developer)

Anyhow, I cannot reproduce this savegame creating relaunch objects thing. I tested by creating the Goal_LastManStanding object, saving, and then loading the saved game and see how many Rule_Relaunch objects are there. Only one was there, as expected.


Clonkonaut (developer)

It probably depends on the order in which the objects are saved in Objects.c
If Last Man Standing comes first, then Relaunch won't be present upon creation.


K-Pone (developer)

I think this doesn't necessarily needs to be present when Goal_LastManStanding doesn't call its Initialize() function. Or are objects calling Initialize() on savegames and only the scenario script is not doing this?


Clonkonaut (developer)

If I understand this bug report correctly, this isn't about savegames but about scenario creation. In a saved scenario, objects will of course call Initialize.


K-Pone (developer)

Well, then I understood that wrong. Just tested, and yes, when saving the scenario and reloading it, Rule_Relaunch is created twice. One by Goal_LastManStanding and another one by the Objects.c afterwards.


occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:

Changeset 4d1a000 by Martin Strohmeier <>
Fix 0001906: Rule_Relaunch is saved properly in Objects.c by using GetRelaunchRule() instead of CreateObject()


K-Pone (developer)

Rule_Relaunch is saved properly now. Instead of CreateObject the Rule_Relaunch object is now properly referenced by using GetRelaunchRule(). The other properties are being applied as usual in Objects.c.

-Issue History
Date Modified Username Field Change
2017-04-18 12:02 Armin New Issue
2017-04-18 14:04 Fulgen Note Added: 0005656
2017-04-30 14:24 Maikel Note Added: 0005670
2017-08-05 13:58 Maikel Target Version => 8.0
2017-08-05 14:26 Maikel Note Added: 0005709
2017-10-26 12:54 Clonkonaut Note Added: 0005831
2017-10-27 14:24 K-Pone Note Added: 0005875
2017-10-27 14:27 K-Pone Note Added: 0005876
2017-10-27 14:45 Clonkonaut Note Added: 0005877
2017-10-27 14:57 K-Pone Note Added: 0005878
2017-10-27 15:05 Clonkonaut Note Added: 0005879
2017-10-27 15:14 K-Pone Note Added: 0005880
2017-10-27 15:15 K-Pone Assigned To => K-Pone
2017-10-27 15:15 K-Pone Status new => confirmed
2017-10-27 16:51 occ Note Added: 0005881
2017-10-27 16:54 K-Pone Status confirmed => resolved
2017-10-27 16:54 K-Pone Resolution open => fixed
2017-10-27 16:54 K-Pone Fixed in Version => 8.0
2017-10-27 16:54 K-Pone Note Added: 0005882
+Issue History