Sign in to follow this  
Jason

Example API MOD (same as in the Steam Workshop)

Recommended Posts

Jason    558

This is a simple mod intended to give modders an example to help them create their own. 

  • adds a new agent, Bryant. Decker's Brother (re-uses existing art) 
  • adds a new item, the Subdermal PDA, Bryant's unique augment (uses two traits in the code that ended up not getting used ) 
  • alters an existing augment, Decker's "Neural Networking" replaced by the "Voight Scanner" (observes and tags guards) 
  • adds a new program, Lance (A suggestion from ArtixBot on the forum) 
  • adds a new Daemon, Infect ( Reduces a random agents AP each turn for several turns).

 

HOW TO SETUP

  • Download the mod files : API_example.zip
  • Unzip the contents of the zip file into the mods folder of your game directory.
    After unzipping you should have a folder in your mods folder called API_examle
    mods\API_example\
     

CONTENTS

The mod files

  • modinfo.txt - sets up important attributes for the mod
  • scripts.zip - all of the lua files for the mod in a zip file
  • gui.kwad - a package of art used in the mod.

Source and help files

  • InvisibleInc modding notes.docx - some reference to help get started modding.
  • KWAD builder - a program to package art files into a kwad
  • scripts - the same source files in the scripts.zip
  • example anim files - file templates for creating new agent animations. 
     

Update Notes
Dec 24, 2015

  • added the old rolling drone and the heavy walking drone to the anims
  • added a sampling of props to the anims

 

Dec 22, 2015

  • added drone anims to the example anim files
  • Like 4

Share this post


Link to post
Share on other sites
Jason    558

The drones have a few more varieties, so they may be a little harder to work with.

I added the:

  • camera drone
  • Null drone
  • basic walking drone
  • Akuma drone, comes in two parts, though I think the  "sankaku_droid_tank_2.anim" might have all the same parts plus a few extras, so it might be all that is needed 
  • Like 1

Share this post


Link to post
Share on other sites

 

This is a simple mod intended to give modders an example to help them create their own. 

  • adds a new agent, Bryant. Decker's Brother (re-uses existing art) 
  • adds a new item, the Subdermal PDA, Bryant's unique augment (uses two traits in the code that ended up not getting used ) 
  • alters an existing augment, Decker's "Neural Networking" replaced by the "Voight Scanner" (observes and tags guards) 
  • adds a new program, Lance (A suggestion from ArtixBot on the forum) 
  • adds a new Daemon, Infect ( Reduces a random agents AP each turn for several turns).

 

HOW TO SETUP

  • Download the mod files : attachicon.gifAPI_example.zip
  • Unzip the contents of the zip file into the mods folder of your game directory.

    After unzipping you should have a folder in your mods folder called API_example

    mods\API_example\

     

CONTENTS

The mod files

  • modinfo.txt - sets up important attributes for the mod
  • scripts.zip - all of the lua files for the mod in a zip file
  • gui.kwad - a package of art used in the mod.

Source and help files

  • InvisibleInc modding notes.docx - some reference to help get started modding.
  • KWAD builder - a program to package art files into a kwad
  • scripts - the same source files in the scripts.zip
  • example anim files - file templates for creating new agent animations. 

     

Update Notes

Dec 22, 2015

  • added drone anims to the example anim files

 

 

 

 

Love U so much, Jason. But can you re-program the builder.exe work with windows 10 32-bit, please!

Edited by JackTheReaper

Share this post


Link to post
Share on other sites
Cyberboy2000    549

Man, I was going to ask for some more anims, but the more I think about it the more it sounds like a good idea if we could just get all the files, so we don't have to ask about bits and pieces any more.

 

I know it's impolite, especially after all you've already done but sooner or later someone would probably ask about it anyway. If you don't want to upload a whole bunch of resources then maybe you could just send animation.xml and build.xml files and then we can extract the rest ourselves.

Share this post


Link to post
Share on other sites
Jason    558

What were you going to ask for Cyberboy2000?  

Were you looking for world prop anims?  There's probably a handful of items I could add that would cover those, like 1x1, 1x2, 2x2 objects, as well as a mainframe item, as they have more parts.



 

Share this post


Link to post
Share on other sites
Cyberboy2000    549

No, what I meant was instead of us asking every time we want an anim there would be a place were we could find all of them.

You don't have to upload them all at the same time if you don't want to, I'm just throwing the idea out there.

Edited by Cyberboy2000

Share this post


Link to post
Share on other sites
Jason    558

Right ;) I got ya. I was just wondering what anim you wanted that prompted that request. Cause I can probably give you that while we figure out the other thing. 

Share this post


Link to post
Share on other sites
Cyberboy2000    549

It doesn't really matter. Maybe Obake v2.0 or some elite guards(plastech?)

Also I think Shirsh said he wanted Archive Decker or something like that (is it different from normal Decker? I thought it was just a recolor)

 

Edit: Shirsh said that he'd appreciate some props like a safe or tiles and also some type of grenade if possible.

Edited by Cyberboy2000

Share this post


Link to post
Share on other sites
Jason    558

The Obake v2.0 probably does have a different animation set up than the v1,0 walker, I probably should have added it yesterday.

But all the guards use the same build system as the agents. The male (agent_deckard) build should cover it. If you are looking for the specific art bits, you can get them using Strelock's KWAD extractor. They are in the characters.KWAD.

You'd just have to dump the art from whichever unit folder into the agent_deckard.anim.

I think if I put that handful of prop anims in, combined with Strelock's extractor, everything would be available already? 

Share this post


Link to post
Share on other sites
Shirsh    129

Ah, yes, it was about that if I play without gray overlays archive Decker have a transparent hat sometimes, so I "rebuild" him with KWADTool extracted sprites but it gives a quite dark seams on his cloak, like KWADTool extract pngs with bits of transparency and that works not always great over old Decker's sprite (slight seams on regular Decker can be seen too but eyes not catches it much). Not so 100% needed but lead to some perfectionism issue.

 

Here's my trouble:

post-448854-0-95386500-1450905102_thumb.

But I must admit that I forgot how it was looking by default (yet I guess I'd remebered if it had seams like that)

post-448854-0-95386500-1450905102_thumb.

Edited by Shirsh

Share this post


Link to post
Share on other sites
Cyberboy2000    549

But all the guards use the same build system as the agents. The male (agent_deckard) build should cover it. If you are looking for the specific art bits, you can get them using Strelock's KWAD extractor. They are in the characters.KWAD.

Yes I know that, but I'd like to have some reference since I'm still new to animation.

Though it's not really an immediate problem. Just something I was was thinking about.

 

Edit: Okay I realised that the problem is not the build/animation but that the extractor leaves out the space around the images and. I apologize for not noticing sooner.

Edited by Cyberboy2000

Share this post


Link to post
Share on other sites
Jason    558
I added the heavy drone and the old rolling drone anims plus a bunch of props. I don't want to add all of the anims to the API example as it would be over 100 megs. 

 

When I come back after break, I'll see about making them all available, but I hope for now there is enough of them to do whatever someone might want to do.

 

Oh yeah, I also added the grenade.anim 

Share this post


Link to post
Share on other sites

Uhm.. Jason, your builder.exe can not run on my computer because it's just support 64-bits windows computer, but mine is 32-bits. Can you please help me how to build the kwad file manual. I can take care of character art and coding(of course, follow your intruction in API_example) file.  :indecisiveness:  :indecisiveness:  :indecisiveness:  :indecisiveness:  :indecisiveness: 

Edited by JackTheReaper

Share this post


Link to post
Share on other sites

Forgive me if i ask too much because i'm just 'the noob' in moding games. I'm not so good at the IT things. I just want to make some 'little-art-of-game' and share with everybody. Because Invisible, inc is a very cool indie game, and Klei Ent. allow the player to change the game's infomation and add their own creation in it. :oops:  :oops:  :oops:  :oops:  :oops: 

Edited by JackTheReaper

Share this post


Link to post
Share on other sites
Shirsh    129

@JackTheReaper, it could be done much faster if you'll create thread about your ideas, tell/show what you interested to achieve and what part you need from a possible collaborator with 64-bit system. 

Edited by Shirsh

Share this post


Link to post
Share on other sites
Barleytree    1

 

I added the heavy drone and the old rolling drone anims plus a bunch of props. I don't want to add all of the anims to the API example as it would be over 100 megs. 
 
When I come back after break, I'll see about making them all available, but I hope for now there is enough of them to do whatever someone might want to do.
 
Oh yeah, I also added the grenade.anim 

 

 

Thanks for taking the time to do this.

 

Even if you don't release the all of the anims in their entirety, I would at least like to have more of the 'build' and 'animation' xml files used for their compilation. In particular, some agents make use of body parts that are not referenced in the Banks or Decker anims.

 

That is, unless there is already a way to find these somewhere in the game's KWADs.

Share this post


Link to post
Share on other sites
Miderre    0

I was hoping I could get some help as I am a newbie trying to mod for the first time. I'm hoping to change some of the stats of some of the game's base items. Will making a entry in the itemdefs.lua file with the same name as an existing item simply overwrite the stats of the item from the base game? If so, where are the files that give the stats of the other items in the base game? The modding intro word document gives Paralyzer 4 as an example, but I can't seem to find where the others might be located so that I could overwrite them as well. I have the game from steam.

Share this post


Link to post
Share on other sites
Shirsh    129

@Miderre in scripts.zip by path scripts/sim/unitdefs you can find itemdefs.lua with all default game items. For DLC's items itemdefs in DLC's scripts.zip. To make your mod mounted strictly after DLC (either way your mod will have a big chance to not work, if you want change DLC items) there's a solution by Lemonymous:

I didn't tested it, so if you'll have a problems ask him

Edited by Shirsh

Share this post


Link to post
Share on other sites
Miderre    0
20 hours ago, Shirsh said:

@Miderre in scripts.zip by path scripts/sim/unitdefs you can find itemdefs.lua with all default game items. For DLC's items itemdefs in DLC's scripts.zip. To make your mod mounted strictly after DLC (either way your mod will have a big chance to not work, if you want change DLC items) there's a solution by Lemonymous:

I didn't tested it, so if you'll have a problems ask him

Thanks for the info! If the game won't launch after I put my mod in the mod folder, does that mean that the issue is with the init function in modinit.lua? Jason's instructions made it sound like that function was the only one called when the game is booted.

Edited by Miderre

Share this post


Link to post
Share on other sites
Shirsh    129
5 hours ago, Miderre said:

game won't launch after I put my mod in the mod folder

In this case go to your \Documents\Klei\InvisibleInc\logs\ folder and investigate game log for information what was wrong

Take an working mod as a base and change it as you need, add things one by one, remove things one by one to not miss moment/reason of failure.

Edited by Shirsh

Share this post


Link to post
Share on other sites
Miderre    0
20 hours ago, Shirsh said:

In this case go to your \Documents\Klei\InvisibleInc\logs\ folder and investigate game log for information what was wrong

Take an working mod as a base and change it as you need, add things one by one, remove things one by one to not miss moment/reason of failure.

So I was using your method when I found adding in commented out lines was causing a failure to launch. I am new to lua but I don't understand how that could possibly happen. I've attached the two versions of modinit and the log that the larger one was creating. I have no idea what went wrong. I've been trying to follow the modinit from "New Items and Auguments" as closely as possible since it does similar things to what I want to do, but I've hit a brick wall.

invisibleinc.txt

modinit.lua

modinit.lua

Edited by Miderre

Share this post


Link to post
Share on other sites
Shirsh    129
6 hours ago, Miderre said:

modinit.lua

That's why I use Akelpad - optional lua syntax highlight. In 1st case It was extra pair of square brackets that ruined everything:

Spoiler

Untitled-2.png.d680458d56549e03589c10857

 

But second looks more like modinit that should work. Did you tried it without sequential modloader part? I have feeling that you didn't add it properly: in his thread Lemonymous write to add "include( scriptPath .. "/lib_sequentialModLoader" )( modApi )" and I didn't see it in your file.

Edited by Shirsh

Share this post


Link to post
Share on other sites
Miderre    0
14 hours ago, Shirsh said:

That's why I use Akelpad - optional lua syntax highlight. In 1st case It was extra pair of square brackets that ruined everything:

But second looks more like modinit that should work. Did you tried it without sequential modloader part? I have feeling that you didn't add it properly: in his thread Lemonymous write to add "include( scriptPath .. "/lib_sequentialModLoader" )( modApi )" and I didn't see it in your file.

Thank you Shirsh! Notepad++ was misleading me to believe that having nested block comments was okay when it really wasn't.

I've gotten to the point where the game loads fine, but trying to start a new campaign with my mod causes it to crash. The log seems to be indicating an issue occurs when I try to start changing the non-DLC guns in modinit's load function, but I can't figure out what the issue is. Any help would be greatly appreciated.

scripts.zip

invisibleinc.txt

Edited by Miderre

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this