Not sure if this classes as a question or a bug report, so I'll put it here.
Just been trialling some updates for Planetfall in 1.77.5348 and I notice that an entity with a role weight of (0.005) spawns correctly, but if the role weight is reduced to (0.001) then it doesn't. This used to work in 1.76.1 with either role weight.
So has a minimum role weight been introduced (aside from (0)), and if so what is it? Or is this an accidental bug, as it may be an OXP-breaker.
Minimum weighting for role
Moderators: winston, another_commander, Getafix
Minimum weighting for role
Last edited by Thargoid on Thu Sep 27, 2012 4:10 pm, edited 1 time in total.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Minimum weighting for role
It could be the case that very low roles get rounded down to 0 if/when there's other ships using roles of (99) or more.
Re: Minimum weighting for role
This is the example where the OXP can spawn a role from a second external OXP, but has the role also built into itself at a very low probability to ensure that at least one candidate is present (but will extremely rarely be used if the second OXP is present). Specifically for this one it's the external location role in Planetfall, but something similar is also used in bigShips and probably a few others.
I specifically checked last night and it works fine in 1.76.1, but fails in 1.77.5348. If the role weight is 0.005 the entity spawns fine, but if it is 0.001 then nothing gets spawned. And that is with the specific entity being the only entity in the role pool so this one should always be selected.
I specifically checked last night and it works fine in 1.76.1, but fails in 1.77.5348. If the role weight is 0.005 the entity spawns fine, but if it is 0.001 then nothing gets spawned. And that is with the specific entity being the only entity in the role pool so this one should always be selected.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: Minimum weighting for role
After rev4951(may 2012) all roles starting with '[' are ignored. Apart from that there doesn't seem to be any substantial change...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Re: Minimum weighting for role
This is a normal role, but with a low weight (as a catch-all role for an external OXP if no other suitable OXP is installed).
For PF and my other OXPs I can work around it as 0.001 should be a low enough weighting. But it's a change from 1.76.1 which may break other OXPs if authors aren't aware of it (or are no longer supporting them).
To be clearer, I'm referring to a unique role which has a low weight assigned to it. So that even with the weight, if it is called and no external OXPs are installed which give a higher weighted role, then it will always spawn. It's designed as a catch-all to prevent script/log errors if it tries to spawn something that doesn't exist by that role.
For PF and my other OXPs I can work around it as 0.001 should be a low enough weighting. But it's a change from 1.76.1 which may break other OXPs if authors aren't aware of it (or are no longer supporting them).
To be clearer, I'm referring to a unique role which has a low weight assigned to it. So that even with the weight, if it is called and no external OXPs are installed which give a higher weighted role, then it will always spawn. It's designed as a catch-all to prevent script/log errors if it tries to spawn something that doesn't exist by that role.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Minimum weighting for role
I cann't reproduce it. I created testship with a role weight of 0.0001 and it just spawned. The console returns
for that ship.
Code: Select all
> PS.target.roleWeights
{
"[testship]": 1,
testship: 1
}
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Minimum weighting for role
I just updated to the latest trunk adn tried again, and it seems to work now. So either there was something weird in my installation or I did something wrong last time.
I'll do some more checking to be sure, but for now it seems to be OK and we can close this one off.
I'll do some more checking to be sure, but for now it seems to be OK and we can close this one off.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link