GoldenEye: Source Forums

  • February 21, 2017, 06:26:38 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3 ... 10
 1 
 on: Today at 05:23:27 PM 
Started by null - Last post by null
Awesome, glad you ask, i have notifications turned off or i would have replied sooner. 

player.SetPlayerModel() was actually a little too much fun to test, because if you try and use it directly in OnPlayerSpawn without the right checks SetPlayerModel  and/or OnPlayerSpawn gets called like 20 times per player spawn, which will lead to a crash once the gameplay is reloaded with like 20 * player spawns. 

This works for teams though (ignore the name, color, levels, kills though):
Code: [Select]
import random 

#Track team levels and kills
        self.TEAM_SCORES = {
            Glb.TEAM_JANUS: {
                'name': "Janus",
                'color': "^r",
                'Levels': 0,
                'Kills': 0,
                'chars': ['boris', 'guard', 'infantry', 'ourumov', 'jaws', 'samedi', 'mayday', 'oddjob'],
                'random_char': random.choice (self.TEAM_SCORES[Glb.TEAM_JANUS]['chars'])
            },
            Glb.TEAM_MI6: {
                'name': "MI6",
                'color': "^i",
                'Levels': 0,
                'Kills': 0,
                'chars': ['bond', '006_mi6', 'female_scientist', 'mishkin', 'valentin'],
                'random_char': random.choice (self.TEAM_SCORES[Glb.TEAM_MI6]['chars'])
            }
        }

self.CreateCVar("ar_onecharperteam", "1", "Each team is assigned one character each. (Use 0 to disable)")

if player and player.GetTeamNumber() == Glb.TEAM_JANUS and not player.GetPlayerModel().lower() == self.TEAM_SCORES[Glb.TEAM_JANUS]['random_char'] and self.ar_onecharperteam == 1:
     player.SetPlayerModel(self.TEAM_SCORES[Glb.TEAM_JANUS]['random_char'], 0)
if player and player.GetTeamNumber() == Glb.TEAM_MI6 and not player.GetPlayerModel().lower() == self.TEAM_SCORES[Glb.TEAM_MI6]['random_char'] and self.ar_onecharperteam == 1:
     player.SetPlayerModel(self.TEAM_SCORES[Glb.TEAM_MI6]['random_char'], 0)

 2 
 on: February 17, 2017, 05:39:51 PM 
Started by null - Last post by Entropy-Soldier
Yeah, a more clear definition of the function's purpose is due at the very least, though it could conceivably be extended to include more characters as well.  We'll look at it for 5.1.


What quirks does SetPlayerModel() have?  I haven't looked at these functions much myself so I'd love to know if they could be improved.

 3 
 on: February 17, 2017, 05:28:21 PM 
Started by null - Last post by 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: [Select]
player.SetPlayerModel()
has its own quirks.

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

Code: [Select]
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")
    '''

Thanks for the info guys!

Null

 4 
 on: February 17, 2017, 05:21:52 PM 
Started by null - Last post by 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.

 5 
 on: February 17, 2017, 05:11:04 PM 
Started by null - Last post by 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)

 6 
 on: February 17, 2017, 04:25:39 PM 
Started by null - Last post by 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

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.

Sorry for the confusion.

Null

 7 
 on: February 17, 2017, 04:19:47 PM 
Started by null - Last post by 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: [Select]
GEMPGameRules.SetExcludedCharacters("bond,boris,valentin,guard,jaws,infantry,Mishkin,Mayday    ,oddjob,ourumov,samedi,female_scientist,006_mi6")

#57 characters between: (" AND ,oddjob will prevent ourumov and characters after from being excluded.
Code: [Select]
GEMPGameRules.SetExcludedCharacters("bond,boris,valentin,guard,jaws,infantry,Mishkin,Mayday   ,oddjob,ourumov,samedi,female_scientist,006_mi6")

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

 8 
 on: February 14, 2017, 10:22:51 AM 
Started by WFCxLima - Last post by WFCxLima
All are available online, especially via YouTube.

There are recently made available "uncompressed" versions of some songs also out there, although for me nothing beats the nostalgia of playing this mod with the original songs.

I customized each and every level so 5-6 original songs that I felt "go with" it play, but I also mixed in the new/remixed stuff since a lot of it is incredibly well done (especially the various Silo themes). I even tossed in a couple of my favorite Perfect Dark songs on some levels to mix it up. The only exception is the "Classic" versions of levels (Temple, Complex, Library, Facility, Archives, Bunker); for each of those I only use the original N64 songs since I feel they match the old-school level design better.

 9 
 on: February 13, 2017, 02:46:35 PM 
Started by joerussell - Last post by ctrl_room57
You can always grab the n64 version!

 10 
 on: February 13, 2017, 02:44:48 PM 
Started by WFCxLima - Last post by ctrl_room57
I would not be mad at all if you shared those mp3s on a Dropbox ha!

Pages: [1] 2 3 ... 10