aliens

Author Topic: New to modding, need a little guidance  (Read 4855 times)

Offline mrxian

  • Colonel
  • ****
  • Posts: 109
    • View Profile
New to modding, need a little guidance
« on: February 13, 2015, 07:47:05 am »
Greetings, everybody.

First, let me thank everyone for enhancing an old favorite game of mine with all these awesome mods.

Now, playing through the game got me thinking about an item that was lacking in the arsenal, and I wanted to make a mod introducing said item.
But I don't know how modding the game works.
So I was wondering if anyone had any tutorials or guides to share, or if I should just download some other mod and start tweaking it to see what happens.

Thanks a lot for any advice you have.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: New to modding, need a little guidance
« Reply #1 on: February 13, 2015, 10:27:24 am »
All modifiable stuff is found in the "Xcom1Ruleset.rul", a ruleset file (or a series of files) provided by OpenXcom.

The following explains the contents of said file/files, and hints at how to modify them -
- for OpenXcom 1.0:
https://www.ufopaedia.org/index.php?title=Ruleset_Reference_%28OpenXcom%29
- for OpenXcom Nightly:
https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29

A mod has to provide its own little (or big) ruleset file, containing the changed or added bits (and eventually new graphics and sounds).

My advice is to download some mods similar to the one you want to make. Then check what these mods provide and their ruleset files, to understand how they have been made.
Then maybe start with something simple, like modifying in some way one of these mods, adding or changing something.
After you feel you understand how things work, you can start your own project.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: New to modding, need a little guidance
« Reply #2 on: February 13, 2015, 01:53:05 pm »
Try to be methodical and work in small chunks. Nothing worse than debugging a giant rulefile.

There are two attributes that may not be covered in the wiki, but should be

They are "Delete:" and "insert-name-of-array:[]" these allow you to remove or clear declarations from the xcom1 rule set which at this time is loaded by default.

You will also have to familirize yourself with yaml syntax. Mostly the errors are caused by an errant space or a missing space.

Get volutar's mcdedit and also bigshot's map view upgrade. Those two will let you work with tiles and maps.

Simplest place to start is items which consist of a few rules, and 3 sets of images, handobs for the character model, bigob for UI and inventory, and floorob for dropped items. Those can be created in normal image editing programs.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: New to modding, need a little guidance
« Reply #3 on: February 13, 2015, 05:12:42 pm »
Use Notepad++ with UTF-8 encoding and YAML language to prevent most syntax issues.

To help checking your code and finding bugs, run into through Falko's Rulfile check

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: New to modding, need a little guidance
« Reply #4 on: February 13, 2015, 05:17:34 pm »
I been working on an yet unreleased "big mod" that has all non UFO graphics that i'm doing custom a lot of stuff including creatures UFO and UFO blocks terrain weapons armors etc...so here is what I learned.

OpenXCom is changing pretty fast. So you can either stay true to 1.0 or go for nightlies. I prefer going for nightlies checking for and installing new versions and always updating my ruleset to fit with latest changes (if any). But that's me.  Nightlies are unstable advanced versions released every couple of days usually more features more fresh less stable. Some nightlies may have bugs but they do get sorted out really fast usually by next nightly.

OpenXCom is pretty customizable graphically but functionality/enemies/mechanics are about 90% XCom. There are some neat things added here and there but OpenXCom stays true to the original game (mostly) so do not get any wild ideas. There are a few alternative executable with more features out there for example OpenXCom Extended.

Modding for OpenXCom is pretty easy although a bit time consuming. You'd be spending about half your time writing rulsets and the othe half  manipulating graphics.

So you need to learn about OpenXCom rulsets. To do that go into openxcom directory and into Rulsets/XCom1Rulsets and  open any of the rul files with a text editor. I recommend Notepad++ because it kinda knows  YML and rulesets are written in YML. For ruleset reference go here https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29 for nightlies. There are some examples at the bottom. But most examples are in the game's rulset directory I listed above.

You gonna put all graphic resources in Resources/yourmod folder. Now to learn to do graphics you kinda have to fumble around to figure out a system. I figured out a way using photoshop and act palettes. Remember that XCom uses palettes that is only 256 colors are allowed per game mode. You can make your files into gifs load them in a rulset as extraSpites and add them as any number over 100 as sprite number then use them in your mod. Don't go below 100 for any sprite number because it may cause issues with already existing game sprites. You want new ones.

An even better way to figure this out is get a mod that's very similar to what you want to make then completely change it up. Then you will learn.

Oh and I'm new to modding too. Well newish. From my little time here I kinda learned this forum is pretty friendly and active. People check these forums every days. Some people like to focus on certain things like terrain for ex Hobbes is expert terrain maker. Some are developers. Some reverse engineered the exe figuring out the original game code or AI routines. Some created editors and really neat programs that can make your own maps etc etc. There are a lot of tools out there burried in the foums. Go to Tools section. Also use forum search features such as "map editor" you will find something.  Etc. I think some of the lead devs are Warboy and SupSuper . But I think there are thers. On git there are a bunch more devs. I think some may just develop and not even post on forums?  So I m not too familiar with the community. But as new modder to another new modder that's my impression so far. In like 3 days I learned so much . Is not hard. Is just time consuming. And is annoying until you figure out the magic way.

Good luck!
« Last Edit: February 13, 2015, 05:31:38 pm by tollworkout »

Offline mrxian

  • Colonel
  • ****
  • Posts: 109
    • View Profile
Re: New to modding, need a little guidance
« Reply #5 on: February 14, 2015, 08:50:15 am »
Ah, drat, what I wanted to do doesn't seem possible.

See, my plan was to make some kind of riot shield for squaddies that are about to breach a UFO. It would have given a sizable armor boost to front armor only. It would be heavy and cumbersome (and too big to fit in a backpack) to keep it's usability low.

But it seems like carried items cannot grant armor.
Too bad.

Still, now that I know how to modify game items, I may get other ideas, so thanks for the help!