Debriefing > Bug Reports & Fixes

[Bug] -Python function SetExcludedCharacters only allows frist 58 chars in list

(1/2) > >>

null:
The function GEMPGameRules.SetExcludedCharacters(char_list * string) only allows the first 58 chars including commas, after that any characters will be ignored from the exclusion, example:

#58 characters between: (" AND ,oddjob will prevent oddjob and characters after from being excluded.

--- Code: ---
GEMPGameRules.SetExcludedCharacters("bond,boris,valentin,guard,jaws,infantry,Mishkin,Mayday    ,oddjob,ourumov,samedi,female_scientist,006_mi6")
--- End code ---

#57 characters between: (" AND ,oddjob will prevent ourumov and characters after from being excluded.

--- Code: ---
GEMPGameRules.SetExcludedCharacters("bond,boris,valentin,guard,jaws,infantry,Mishkin,Mayday   ,oddjob,ourumov,samedi,female_scientist,006_mi6")
--- End code ---

I'm not sure how to trace the code it its origin, but I'm guessing this is part of the main compiled code binary, which i have no access to.

Btw, what is the reference string for the "Random" character?

Thanks,
Null

null:
I noticed i can't edit my posts, but an after thought that characters can be confusing because I'm using two contexts

I mean string characters here:

--- Quote ---#58 total characters between: (" AND ,oddjob
#57 total characters between: (" AND ,oddjob
--- End quote ---

I mean player selected characters here:

--- Quote ---will prevent oddjob and characters after from being excluded.
will prevent ourumov and characters after from being excluded.
--- End quote ---

Sorry for the confusion.

Null

killermonkey:
This function was not meant to exclude all the characters except for one. It was meant for one or two exclusions for gameplay reasons (like live and let die)

Entropy-Soldier:
Well I had a whole reply typed up to say basically that but KM beat me to it.  Ultimately the system was set up under the assumption the character exclusions would be minimal so the variable dedicated to it is only 64 bytes.

Anyway, "_random" is the identifier for the random character slot, but the exclusion list seems to be applied before it's added so putting it on there won't have any effect.  This is probably by design since this character slot is most likely expected to always exist.


Honestly for what you're trying to do I'd say just force everyone to be the desired character on spawn.  I guess we could add a python setting to bypass character select for occasions like this to make the presentation a bit cleaner, but functionally it would be the same.

null:
i had to change my reply a little too since you're reply.  Luckily, I was planning on choosing characters specifically, but this was kinda driving me crazy because
--- Code: ---
player.SetPlayerModel()
--- End code ---
has its own quirks.

Maybe just an update to the comment starting in GEMPGameRules.py #Line: 201 would be suitable.


--- Code: ---
def SetExcludedCharacters( char_list ):
    '''
    Exclude characters from being shown on the character select panel.
   
    char_list -- Comma seperated list of character identities (ex. "006_mi6,bond,samedi")
    '''
--- End code ---

Thanks for the info guys!

Null

Navigation

[0] Message Index

[#] Next page

Go to full version