Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: New Creatures  (Read 923 times)

Teh Barple

  • Bay Watcher
    • View Profile
New Creatures
« on: July 05, 2012, 03:28:40 am »

Hey, I've been playing around with the XML Files and such and I was wondering if you can create new creatures/people like this or is there a more complicated process. Am I just missing something? Also, how do I make it so a certain creature/person has a certain weapon, does it tie into this or what?

Thanks if anyone cares to answer.
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: New Creatures
« Reply #1 on: July 05, 2012, 06:03:13 pm »

Creature types are pretty complicated and require editing the source code and recompiling the game, unfortunately. Attaching weapons to creature types involves editing the creature type, so it's the same deal.
Logged

Teh Barple

  • Bay Watcher
    • View Profile
Re: New Creatures
« Reply #2 on: July 05, 2012, 06:10:13 pm »

Creature types are pretty complicated and require editing the source code and recompiling the game, unfortunately. Attaching weapons to creature types involves editing the creature type, so it's the same deal.

Is the source code in the art folder or is it pretty much hardcoded?
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: New Creatures
« Reply #3 on: July 05, 2012, 07:39:21 pm »

Creature types are pretty complicated and require editing the source code and recompiling the game, unfortunately. Attaching weapons to creature types involves editing the creature type, so it's the same deal.

Is the source code in the art folder or is it pretty much hardcoded?

It's hardcoded. The definition of hardcoded, really, is that something is in the source code. The source code is what the developers write in order to tell the computer what the program actually does.

However, LCS is open source, so editing the source code isn't impossible for a player. It is contained in a downloadable archive online on the Sourceforge servers. You probably won't be able to do much meaningful with it unless you're a programmer though:

Code: [Select]
case CREATURE_SECURITYGUARD:
   GIVE_GENDER_MALE;
   if(law[LAW_GUNCONTROL]==-2)
   {
      Weapon w=Weapon(*weapontype[getweapontype("WEAPON_SMG_MP5")]);
      cr.give_weapon(w,NULL);
      Clip c=Clip(*cliptype[getcliptype("CLIP_SMG")],4);
      cr.take_clips(c,4);
      cr.reload(false);
   }
   else if(law[LAW_GUNCONTROL]!=2)
   {
      Weapon w=Weapon(*weapontype[getweapontype("WEAPON_REVOLVER_38")]);
      cr.give_weapon(w,NULL);
      Clip c=Clip(*cliptype[getcliptype("CLIP_38")],4);
      cr.take_clips(c,4);
      cr.reload(false);
   }
   else
   {
      Weapon w=Weapon(*weapontype[getweapontype("WEAPON_NIGHTSTICK")]);
      cr.give_weapon(w,NULL);
   }
   armor=new Armor(*armortype[getarmortype("ARMOR_SECURITYUNIFORM")]);
   cr.give_armor(*armor,NULL);
   cr.set_skill(SKILL_PISTOL,LCSrandom(3)+1);
   cr.align=-1;
   cr.infiltration=0.1f*LCSrandom(3);
   cr.age=AGE_MATURE;
   cr.set_attribute(ATTRIBUTE_HEALTH,3);
   cr.set_attribute(ATTRIBUTE_AGILITY,3);
   cr.set_attribute(ATTRIBUTE_STRENGTH,2);
   break;

Computer programming is kind of like wizardry -- the learning curve is steep, it takes time and effort, there are necessary tools that only practitioners have on hand, and it grants its masters phenomenal cosmic power. If it's something you are interested in doing and prepared to invest time in, I fully recommend it. You can acquire every tool you need and learn everything you need to know, all for free, though you will need to install some large pieces of software, and it will certainly take time to develop the skills.

Alternatively, you can accept my apologies that creatures aren't more easily editable.
« Last Edit: July 05, 2012, 07:41:32 pm by Jonathan S. Fox »
Logged

Teh Barple

  • Bay Watcher
    • View Profile
Re: New Creatures
« Reply #4 on: July 05, 2012, 09:28:52 pm »

Well, thanks anyway. I'll see if I can eventually figure this out.
Logged