Advanced Search

Author Topic: How do you make a class based mod compatible with LMS?  (Read 2107 times)

0 Members and 1 Guest are viewing this topic.

April 07, 2012, 02:34:34 AM
Read 2107 times

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
How do you make a class based mod compatible with LMS?
« on: April 07, 2012, 02:34:34 AM »
I don't know how to do this. When I try, every class gets every weapon, even the ones that don't belong to their class.. What's the standard procedure to do this?

April 07, 2012, 02:36:32 AM
Reply #1

Offline SaviorSword

  • Standard Member

  • Yar har, fiddle dee dee...
  • Date Registered: January 01, 2011, 02:13:30 AM

    • View Profile
Re: How do you make a class based mod compatible with LMS?
« Reply #1 on: April 07, 2012, 02:36:32 AM »
Like how in YD's hero classes start with weapons? Ya could always go probe it for yar needs.

April 07, 2012, 02:37:10 AM
Reply #2

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
Re: How do you make a class based mod compatible with LMS?
« Reply #2 on: April 07, 2012, 02:37:10 AM »
Quote from: "SaviorSword"
Like how in YD's hero classes start with weapons? Ya could always go probe it for yar needs.
I've looked at it, same with GVH, but I can't see any differences to my code.


I don't know which part controls what classes get for LMS matches.

April 07, 2012, 03:02:51 PM
Reply #3

Offline CarThief

  • MM8BDM Extender
  • **
  • Date Registered: August 21, 2009, 10:31:00 PM

    • View Profile
Re: How do you make a class based mod compatible with LMS?
« Reply #3 on: April 07, 2012, 03:02:51 PM »
Considering you're using classes they're probaly bound to come with certain items, i assume? Much like any class in GVH, using stuff like this:
Quote
...
actor Choke : PlayerPawn
{
Health 150
Mass 500
limitedtoteam 1
player.forwardmove 1.38
player.sidemove 1.0
Player.Maxhealth 125
Player.DisplayName "Choke"
player.startitem "Choketeeth" <<
player.startitem "AchievementID", 1 <<
player.startitem "achievelist", 1 <<
player.startitem "ArrowSingle", 40 <<
...
Using that you could give them some sort of placeholder item where the ACS will later on check for to give and take the correct items, much like the code i added that removed bot's default weapons and gives them slightly improved versions that improve their performance.

As is shown partially here:
Quote
script 995 ENTER
{

if(PlayerIsBot(PlayerNumber())){

Delay(6);

if(CheckInventory("DontAlterBot")>=1){
Terminate;
}

if(GetCVAR("gvh_superbots") == 1){
   if(CheckInventory("CyborgPlasma")>=1){ <<
      GiveInventory("BotSuperCyborgPlasma",1); <<
      TakeInventory("CyborgPlasma",1); <<
      SetWeapon("BotSuperCyborgPlasma"); <<
      Terminate;
   }
}
Im guessing you're missing an checkup item of some kind like this, and else i'm not quite sure without any examples to go by.

(And in case you're using morphing try something this as well: player.MorphWeapon "Choketeeth".)

April 07, 2012, 11:11:25 PM
Reply #4

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
Re: How do you make a class based mod compatible with LMS?
« Reply #4 on: April 07, 2012, 11:11:25 PM »
So it MUST be done with ACS? y/n

April 08, 2012, 01:42:20 AM
Reply #5

Offline CarThief

  • MM8BDM Extender
  • **
  • Date Registered: August 21, 2009, 10:31:00 PM

    • View Profile
Re: How do you make a class based mod compatible with LMS?
« Reply #5 on: April 08, 2012, 01:42:20 AM »
I guess that depends what you're trying to do, if a class is supposed to get new sets of weapons or items mid-game instead of only when freshly spawning ACS is most likely needed.
If they only need to have their stuff at the start just set each class actor with unique and idividual player.startitem "item_here" commands. Assuming you've set all the other class stuff right.

Basically copying what GVH does for its classes (minus the team X-only requirements, aka no "limitedtoteam 0/1" commands, unless you actually want to restrict them to certain teams) while excluding the ACS should work.

Edit: And i could have sworn you where more... experienced on the subject of Skulltag modding, unless you're more in it for the game itself, i guess.
Nothing like looking in a mod's coding to find out how it works though, best way to learn when familiar with the basics already.