Jump to content

Auto fill MigrationData?

No Response 1.0.3

Sasquire
Sasquire

Posted

We use a separate program to create custom profiles which gets uploaded over ftp daily. They're simply set to parent monuments. However, when the bot plugin loads, the migrationdata remains empty and the bots (those listed under customProfiles) all spawn in the centre of the map.

If I use the UI and add a new profile, all the migrationdata gets auto filled for every profile, and then the custom profiles work perfectly thereafter. Is it possible to auto fill the correct migrationdata on bot load (or restart)? Or have the option to do so?

Appreciated.

  • Administrator
Steenamaroo

Posted

Hi - Yes, I might be able to do that.

I'll take a look shortly, then get back to you.

  • Administrator
Steenamaroo

Posted

Hi again,
I'm just looking at the code here - This is one of the few areas that has barely changed from BotSpawn.
As far as I can see it should autopopulate migration data for any new profile that has a valid Parent_Monument and no migration data to go with it.

That, actually, was always the expectation, because users would have been adding Parent_Monument in json then reloading.

 

One thing that has changed, though, is that any existing custom spawn points for a profile are deleted if Parent_Monument is added, or changed,
because those existing spawn points would no longer make sense.

Obviously if you're prepping ahead they do but in real use when people have added custom spawn points, then added Parent_Monument,
those existing points get relocated and would be somewhere you don't want them.

 

Anyway - If I've misunderstood, or it's not doing what I think it should do, let me know.
Feel free to get me on discord, if you use it.

Sasquire

Posted (edited)

Yeah, it was doing it fine in BotSpawn, but since the move to BotReSpawn, it's no longer auto populating migration data. If we create a manual profile for the custom json with...

{
	"Profiles": {
		
      "low_super2_pistol.nailgun": {
      "type": 1,
	  "Spawn": {
        "AutoSpawn": true,
        "Radius": 90,
		"BotNames": [
           "[YT11] Name"
        ],
        "BotNamePrefix": "",
        "Keep_Default_Loadout": false,
		"Kit": [
           "low_monument_pistol.nailgun_1"
        ],
		"Day_Time_Spawn_Amount": 3,
		"Night_Time_Spawn_Amount": 2,
		"Announce_Spawn": false,
        "Announcement_Text": "",
		"BotHealth": 83,
		"Stationary": false,
		"UseCustomSpawns": false,
        "ChangeCustomSpawnOnDeath": false  
      },
      "Behaviour": {
		"Roam_Range": 40,
		"Aggro_Range": 40,
		"DeAggro_Range": 60,
		"Peace_Keeper": false,
		"Bot_Accuracy_Percent": 24,
		"Bot_Damage_Percent": 46,
		"Running_Speed_Boost": 0,
		"AlwaysUseLights": false
	  },
      "Death": {
        "Spawn_Hackable_Death_Crate_Percent": 0,
		"Death_Crate_CustomLoot_Profile": "",
		"Death_Crate_LockDuration": 600,
		"Corpse_Duration": 4,
		"Weapon_Drop_Percent": 100,
        "Min_Weapon_Drop_Condition_Percent": 0,
        "Max_Weapon_Drop_Condition_Percent": 100,
		"Wipe_Belt_Percent": 0,
		"Wipe_Clothing_Percent": 0,
		"Allow_Rust_Loot_Percent": 0,
		"Respawn_Timer": 10
	  },
      "Other": {
		"Chute": false,
		"Suicide_Timer": 10,
		"Die_Instantly_From_Headshot": false,
        "Instant_Death_From_Headshot_Allowed_Weapons": [],
		"Parent_Monument": "Abandoned Supermarket 2",
		"Disable_Radio": true
      }
    }

  },
	"MigrationDataDoNotEdit": {
		
  }
}

and upload that json file, restart the bot, the migration data remains empty and the bot will spawn centre map. Another oddity which is definitely related to this issue, is that the file isn't auto-formatted. eg when you used to load the bot using a json file our script created (or one manually typed our even), it would get formatted correctly when the mod loads. So if it's not tabulatted/spaced correctly like above, your mod with clean that up. That no longer happens (though the bot still spawns. However, once we add a custom profile via the UI, the migration data for all them are filled, and then the file is correctly formatted as well. Hope this makes sense.

(Not that I care about it's formatting, but I feel the issue is related.)

Edited by Sasquire
  • Administrator
Steenamaroo

Posted (edited)

Hi,
I've found the difference.

It looks like timing changes I made mean that the data file are not re-saved after the initial setup.
They would get set eventually, but not right after initial setup.


I don't really understand why the changes, despite not being committed to file straight away, aren't coming into effect on the live server,
but certainly changing the timing/setup procedure can make the files auto-save after setup again, as would have been the case in BotSpawn.

I'll make sure this is in the next update. If you need it sooner DM back to let me know and I'll send you pre-patched copy.

Edited by Steenamaroo
Sasquire

Posted

You've been very regular with the updates, so I'm happy to wait for the next one 😉

  • Love 1
Sasquire

Posted (edited)

Thanks for the recent update. This has indeed corrected the auto migration location as well as the formatting. However, another problem has presented itself as they're (custom profiles) still spawning centre map. From what I can tell, this is due to the offset in migrationdata. So if you add a parent_monument and let the migrationdata populate itself, while it gets the ParentMonument details correct, it auto adds an offset that sends all of the bots to the centre of the map. No idea why.

I believe the offset should be just x 0, y 0, z 0 which would get all the bots working fine. But if I have three custom profiles linking to launch as an example, it will offset them all exactly the same, and all will spawn centre map. Profiles added via the UI appear to add (offset) correctly.

EDIT: I've have a distant memory that the old BotSpawn may have had this problem as well. I got around it by making a script that downloaded the custom profiles (after migration was auto filled), zeroing the offsets and reuploading. 

Edited by Sasquire
  • Administrator
Steenamaroo

Posted (edited)

Hi,
Glad that initial change worked, at least.

The way spawnpoints and custom locations are stored relative to monuments did change at some point, because for a long time custom spawn points did not migrate - Just the centre location of custom profiles.

I think I used to store custom spawn points as real world positions, then also store the required information to relocate those positions to where the user wanted them, whereas now I actually store the custom spawn points as relative positions,
which means there must be a valid parent monument before adding custom spawn points.

I'd need to look into it tonight, to make sure, but I think that means you'd need to A: be storing the custom spawnpoints as positions relative to the monument and B: You'd need to store the rotation of the monument in offset data.

Off the top of my head I think monument rotation is the only thing needed in migration data, for custom spawnpoints.

I'm not sure if that renders your tool useless or not but if you want to get me on discord we can talk it through when I'm home (6 hours or so).

Edited by Steenamaroo
Guest

Posted

Changed Status from Pending to No Response

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.