PVKII Randomizer

VelociraptorVelociraptor Senior
edited 10:31AM in Scripting
Good fun with TF2, so why not?
Now I don't know if this hasn't been suggested before, I ain't an active forum reader, so I'll just post it anyway.

I came up with the idea of a Randomizer for PVKII. Yes, this is a stolen idea from whoever was the brilliant mind who made the Randomizer for TF2. Seeing as some people might not know what TF2, or, let alone, randomizer is, I believe a little explaining is in order. If you know what both of these are, feel free to skip this part.

Team Fortress 2, AKA TF2 is a class based team shooter, much like PVKII (and based on the same Source engine), only with guns, developed by Valve. It's distinctive features are 9 unique classes, each vital to the team's success and each with their distinctive weapons, some of which are what you commonly find in shooters, while some are so original, you are bound never to find them anywhere alse. Also the game is distinguished by it's sorta comic book visual style and... well fun gameplay. Believe it, it is VERY fun. If you haven't tried it, I suggest you do.

Now that TF2 part is clear, let me explain the randomizer. Again, if you already know what it is, skip this part. Randomizer is sort of a TF2 mod or a plugin, whatever you call it. It's basics are the same as the game's Arena mode, only with a little twist. Every round each player spawns with a random class and is given random weapons. Taken into account that there are 9 classes and each has 6 possible weapons (exept for Engineer, which hasn't been updated yet, and so far has 3), this makes up for LOTS of possiblilities (do the math if you like) and somewhat of an unpredictable and unrepeatable gameplay.

So, the idea behind all this is both a suggestion and a question. I think the suggestion is quite obvious. How about making this for PVKII as well? I mean think about it. PVKII has a Last Team Standing mode, which would fit perfectly as a base for the mod. So each round every player spawns with a random class (or perhaps even team) and is given random weapons. Think of the possibilities: Skirmishers with Great Swords, Heavy Knights with pistols, Berserkers with Blunderbuss, you name it. Chaos, some might say? Well... yes. Total chaos in fact, which is the whole idea of fun behind the mod. Randomizer makes up for unpredictable and extremely fun (in most cases) gameplay, so it would be a good alternative for those who get fed up by the usual PVKII. No offense towards it, I absolutely LOVE the mod, but let's face it, even very good things get boring after a while.

And now finally- the question part. Seeing as I have no experiance whatsoever in moding and know little to nothing about the Source engine, I ask those who do know. Is such a thing possible? I see no trouble if it was available in one game, but I might of course be mistaken. So if anyone thinks this is possible and is interested in this idea and isn't lazy to spend some time doing it (though I have no idea how hard or time consuming it can be), mabye you could see to realising this idea? Of course if enough people seem interested in this. Dunno, mabye I'll just get flamed. In any case, I await your responses, be they positive or negative.
«1

Comments

  • SquirrelSquirrel Senior
    edited March 2010
    There are a few restrictions.
    What I know is that the class-files have been encrypted, or as we can call it, non-changable. This was due to that certain servers modified the weapon statistics, and made them available for other classes. It wasn't supposed to be that way, and therefore it was changed.

    Example:
    Back in beta 1.1, when the HK had the Crossbow, it was given to the Vikings to induce balance (if one can call it that) at some points. I only experienced it once though.

    What I don't know if's is possible to be done serverside.

    What I can tell you though is that you can obtain most, if not all weapons by entering "impulse 101" in your console, after enabling cheats (sv_cheats 1). Ofcourse only on your own created servers smile.gif

    Implementing Randomizer in-game is unlikely though, but as I said; it might be possible as a server project.
  • VelociraptorVelociraptor Senior
    edited 10:31AM
    Excuse my lack of understanding, as I said, my knowledge about the technical side of games and altering them is very poor, but by server project you mean it would be something like a downloadable plugin which is restricted to that server only? Cause I think that's exactly what it is on TF2. That is what I would suggest for PVKII as well- a server-unique thing. IF of course it is possible to bypass that weapons restriction in custom servers. I'm certainly not suggesting Randomizer to be added as a new game-mode- it would make little sense, and the devs are busy as it is, having so much material planned for the future. No, this is something for others to accomplish. Once again- IF it is possible.
  • SquirrelSquirrel Senior
    edited 10:31AM
    If Randomizer is performed as a plugin/script for dedicated servers, one could probably just take the existing Randomizer plugin/script for TF2 and configure it by PVK's standards. The thing is that I think it will collide with the encrypted .ctx-files that are needed to configure the classes.

    As I said however, I can't give you a straight answer unfortunately.

  • HarliefHarlief Baby get Shakey after school Senior
    edited 10:31AM
    QUOTE (Zombiesquirrel @ Mar 17 2010, 03:29 AM) »
    What I can tell you though is that you can obtain most, if not all weapons by entering "impulse 101" in your console, after enabling cheats (sv_cheats 1). Ofcourse only on your own created servers smile.gif

    I had no idea you could do that, that's gonna make LANS more interesting
    It'd be quite cool if you could pick up the small swords of slain enemies.
    imageimage
  • DuckSauceDuckSauce May the Sauce be with you! Senior
    edited 10:31AM
    Weapons are normally hardcoded in the server side player spawning. So with a server side plugin, it could be possible, assuming you're allowed to modify what the players get on spawn.

    The fact that weapon files are encrypted shouldn't matter, unless the PVK2 team specifically linked each weapon to a class in the encrypted weapon files instead of the standard way(which TF2 probably uses)
    The sauciest person in the world.
  • Teh_SuxTeh_Sux Senior
    edited 10:31AM
    A skirmisher with a longsword. That's awesome...
    I have learned my lesson at last and may have a real forum signature thanks to the kind mercy of Bingo Bango
  • J-coJ-co Tramp Senior
    edited 10:31AM
    QUOTE (Harlief @ Mar 16 2010, 09:38 PM) »
    I had no idea you could do that, that's gonna make LANS more interesting
    It'd be quite cool if you could pick up the small swords of slain enemies.


    Spam
    "npc_create npc_parrot" in the console to make it even more interesting
    guitarsmallb.jpg
    I have an aristocratic smile and like to punch people
  • VelociraptorVelociraptor Senior
    edited 10:31AM
    Well it seems we ain't gonna find out whether it works or not, unless someone actually tries. Taking the existing script and fitting it for PVK II sounds possible. Too bad I have no idea how to do even that, but perhaps we will have some volunteers... once more people see this idea.
  • Sir StalwartSir Stalwart Senior
    edited 10:31AM
    I have TF2 but, haven't seen the randomizer thing. I think this is a cool idea.
    A real warrior isn't unafraid, he is afraid to show it.
    image
    image
  • HeiHei and truly did she know the name of the Kong Senior
    edited 10:31AM
    That would be hilarious fun
  • edited March 2010
    image

    Done with bots, ent_remove_all and ent_create. Spawning a new weapon however makes it respawn in the center of the map at idle chest respawn intervals. I think if you use the give command instead it doesn't do that. So it's possible to make a rough plugin that makes those commands bypass sv_cheats and restricts players from using them, and randomly forcing the give command on players for 1-2 weapons on spawn.
    image
  • VelociraptorVelociraptor Senior
    edited 10:31AM
    Man that is awesome. So it is possible after all, and the screenshot suggests a whole lotta fun. Now we just need someone to make the plug-in. I guess. If anyone's down for the job. And yeah, after that a server will be needed to host the plugin on. Sounds like a larger community interest is required.
  • WarcasterWarcaster Senior
    edited 10:31AM
    I am interested.

    ... Is that enough interest yet?
    image
  • VelociraptorVelociraptor Senior
    edited 10:31AM
    Depends solely on whether or not you have a server and are willing to make and host the plugin on it. If yes, then it's more than enough.
  • CrackaPollyCrackaPolly PVKII Team, Authorized Creator
    edited 10:31AM
    The weapons are not restricted. The script files being encrypted isn't an issue because they are used just to determine what weapons they spawn with.

    Plugin would just remove all player weapons after they spawn and give them randomly some weapons from each type of weapon. So that you get a balance of choices instead of ending up with a keg, throwing axe, and parrot or something where you are gonna be raped in melee.

    Files are encrypted because of some server a looooong time ago would be changing the whole mod for the server so that it isn't a class game anymore. They make all weapons equal, all classes equal, and they removed anything that wasn't a melee weapon. When you don't have tons of servers it makes people who might try to play and chose that server to start that the mod is naturally that way.
  • HeiHei and truly did she know the name of the Kong Senior
    edited 10:31AM
    Yeah, when I hosted a cheats server in 2.2 I used to give myself all the weapons

    I'm wondering if a skirmisher's speed combined with a greatsword would cause massive damage with the momentum modifiers, or if it would be no more than a HK
  • edited 10:31AM
    Though I am no coder, If I would make a random weapons spawn system, it would be like this:


    Tier 1 - Melee weapons.
    (1 randomly chosen upon spawn)

    Short sword (weapon_archersword)
    Axe-sword combo (weapon_axesword)
    Berserker Axe (weapon_bigaxe)
    Skirmisher Cutlass (weapon_cutlass)
    Captain Cutlass (weapon_cutlass2)
    Seax Shield (weapon_seaxshield)
    Gestir Spear (weapon_spear)
    HK's Shield'n'Sword (weapon_swordshield)
    Huscarl Axe (weapon_twoaxe)
    Claymore (weapon_twosword)
    Huskie's Shield'n'Sword (weapon_vikingshield)

    Tier 2 - Ranged weapons.
    (80% of getting 1 on spawn)

    Blunderbuss (weapon_blunderbuss)
    Flintlock (weapon_flintlock)
    Crossbow (weapon_crossbow)
    Longbow (weapon_longbow)
    Javelin (weapon_javelin)
    Throwing Axes (weapon_throwaxe)


    Tier 3 - Special weapons.
    (25% of getting 1 on spawn)

    Skirmisher's Keg (weapon_powderkeg)
    the Parrot (weapon_parrot)


    Optionally, maybe also reduce or remove chances of a class getting his own weaponry.

    <!--quoteo(post=185712:date=Mar 19 2010, 11:28 PM:name=HEI
    image
  • SquirrelSquirrel Senior
    edited 10:31AM
    Momentum is based on the classes maximum velocity.

    Max velocity for Heavy Knight is lower than Skirmisher obviously, but they both deal 100% damage when moving at their top speed (190 for HK, 260 for Skirmisher). In other words, they will deal the same damage percentage when moving at full speed, even though Skirmisher is faster.

    Extra momentum damage is dealt when you exceed that limit, like dropping from heights for instance. Maximum momentum damage that can be dealt is an additional 50% (150% total).

  • Sir StalwartSir Stalwart Senior
    edited 10:31AM
    QUOTE (CrackaPolly @ Mar 19 2010, 03:09 PM) »
    The weapons are not restricted. The script files being encrypted isn't an issue because they are used just to determine what weapons they spawn with.

    Plugin would just remove all player weapons after they spawn and give them randomly some weapons from each type of weapon. So that you get a balance of choices instead of ending up with a keg, throwing axe, and parrot or something where you are gonna be raped in melee.

    Files are encrypted because of some server a looooong time ago would be changing the whole mod for the server so that it isn't a class game anymore. They make all weapons equal, all classes equal, and they removed anything that wasn't a melee weapon. When you don't have tons of servers it makes people who might try to play and chose that server to start that the mod is naturally that way.

    Yes, this is the man I was going to tell you to ask.
    A real warrior isn't unafraid, he is afraid to show it.
    image
    image
  • M1ghtym1ckM1ghtym1ck Senior
    edited 10:31AM
    Iam very interested as well! this is a great idea ! that can make PVK even more popular thats for sure.
    Together with the deathmatch idea of that other guy (forgot his name -.-) this would be amazing!

    maybe one day they will bring us this godsent:D
    ATI Sux
  • MadKatMadKat Senior
    edited 10:31AM
    I've been giving this addon some thought. It might be a fun undertaking.

    Question for devs out there: do cl_team and cl_class ever get set? Or would you need to keep track of the clients from the changeteam and changeclass events?
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • MadKatMadKat Senior
    edited 10:31AM
    Progress update:
    Writing this as a SourceMod plugin using the TF2 version as a starting point. Almost ready to go. I just need to get some time to give it some solid testing. Random classes will not be supported in the first version, however it should come up shortly. Does anyone know how the models react to being on a different team? Is there any color identification? If not, I'll probably have to figure out a way to slap on a team color-coordinated glow effect so you know who to kill.

    By default, characters will spawn with a melee weapon, have a high chance to spawn with a ranged weapon, a low chance for an additional melee weapon, an even lower chance for an additional ranged weapon and an equally low chance to spawn with a special weapon.

    There will be a set of cvars to control the behavior of the plugin for server owners.

    rnd_enabled - turn the mod on or off
    rnd_multi_melee - percent chance to spawn with an additional random melee weapon
    rnd_ranged - percent chance to spawn with a ranged weapon
    rnd_multi_ranged - percent chance to spawn with an additional random ranged weapon
    rnd_special - percent chance to spawn with a random special weapon

    rnd_hail_mary - give everyone kegs
    rnd_blotoutthesun - give everyone parrots

    I need to do some experimenting to see how ammo works and such, but I'm anticipating things will flesh out nicely once the initial release goes out and some feedback comes in.

    If time allows, the experimental version will be live on my server this evening for testing. I'll update this thread as it progresses.
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • edited 10:31AM
    I doubt there will be any trouble with swaping player models.
    image
  • MadKatMadKat Senior
    edited 10:31AM
    I need correct offsets for GiveNamedItem and Weapon_Equip to proceed. The disassembly on allied modders is too far out of date.

    Busted for now.
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • MadKatMadKat Senior
    edited 10:31AM
    Dug up the values I needed. Working through issues.

    Here's the 2.3 vtable offsets for anyone else that needs them: http://wiki.alliedmods.net/CPVK2Player_Off...and_Knights_II)
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • MadKatMadKat Senior
    edited 10:31AM
    A rudimentary version is running on my server right now for anyone that wants to play with it. I need to handle cases where you need to get ammo for the weapon (javelin, crossbow, longbow, parrot, blunderbuss). But you can pickup ammo packs on the map. Removal of default items isn't working correctly, and on respawn the system seems to get tripped up.

    Even so, there were about 9 people on earlier enjoying the thorough chaos.
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • SquirrelSquirrel Senior
    edited March 2010
    QUOTE (MadKat @ Mar 25 2010, 07:58 AM) »
    A rudimentary version is running on my server right now for anyone that wants to play with it. I need to handle cases where you need to get ammo for the weapon (javelin, crossbow, longbow, parrot, blunderbuss). But you can pickup ammo packs on the map. Removal of default items isn't working correctly, and on respawn the system seems to get tripped up.

    Even so, there were about 9 people on earlier enjoying the thorough chaos.


    Sounds great! I'll try to stop by and test it out when I get the time, since I really like the idea for this.
  • MadKatMadKat Senior
    edited March 2010
    If anyone is so inclined, I could use some testers this evening.

    Random weapons are working without any issue. Trying to take existing weapons away from players is another matter entirely. It crashes the plugin. So that is disabled right now.

    Gathering data for classes when people around around.
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
  • HeiHei and truly did she know the name of the Kong Senior
    edited 10:31AM
    source engine has...troubles with removing weapons. It totally ruined a project I had for HL2DM to make a melee-only map & server
  • MadKatMadKat Senior
    edited 10:31AM
    There is a function in PVKII that does it pretty well. RemoveAllItems(). Unfortunately, it also drops the HUD and everything else. As far as I can tell, anyway. If I could recover from that, I would.
    Programmer, Swashbuckler
    Author of PVKII Randomizer
    Author of PVKII WeaponsMaster
Sign In or Register to comment.