Author Topic: FTL and ship design mods?  (Read 4015 times)

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,229
Re: FTL and ship design mods?
« Reply #15 on: April 30, 2015, 09:30:58 PM »
Disassembly: Success.  1.04M lines, 42 megabyte output.  Big fat file.
I'm impressed.  That's where I gave up.  The thought of trying to go through everything to make mods was just more than I wanted to deal with.

Is it effecting only player fighters though, or also the AI's fighters?
It should be all fighters.  Generally, the AI uses the same unit type object, with a different owner.  As far as I know, only for things that have different stats does the AI use a different unit type object.

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: FTL and ship design mods?
« Reply #16 on: May 01, 2015, 05:48:32 AM »
I'm impressed.  That's where I gave up.  The thought of trying to go through everything to make mods was just more than I wanted to deal with.

<bow>

I switched over to AI War from 6 months of modding another game this way, I've gone numb to it at this point (mostly).  :) Now I just see IL_#### line tags and opcodes scrolling by in my sleep.  I use my own line tagging codes to make finding stuff again later easier, though for this one with its giant functions and frequently generic/unnamed elements I am going to have to just log overall vanilla/updated line positions in my repository so I can maintain stuff.

Is it effecting only player fighters though, or also the AI's fighters?
It should be all fighters.  Generally, the AI uses the same unit type object, with a different owner.  As far as I know, only for things that have different stats does the AI use a different unit type object.

Yup, you're correct Toranth.  The only other exception that I noticed at this point, sort of, is the Resistance vs. Marauder split.  They fall back to the same block of code that defines their numerical stats, but point to different assets in graphical construction, display name, and hostility.

Arcen's monolithic coding approach has its advantages.  What it lacks in readability/navigability at points, it makes up for it in being easy to extend.  This proof of concept took all of three lines of MSIL code to do -- the displayed ship properties update, movement changes, etc were all picked up automatically by the existing structures.  Hell, I wouldn't be surprised if it would automatically get filtered by the "teleporting" ship type in map setup, though I would have to double-check that, I do remember seeing certain classes tracked their covered ships by name rather than other properties.

Anyway, the priority in design on making it easy to expand for them is pretty apparent when you pop the top -- makes sense in light of their concern with long-term support/updating.
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline Pumpkin

  • Hero Member Mark III
  • *****
  • Posts: 1,195
  • Neinzul Gardener Enclave
Re: FTL and ship design mods?
« Reply #17 on: May 01, 2015, 07:29:19 AM »
 :o

Very impressive. Gratz. It's like reading a sort of AAR :D

So, what are you up to, now? What was your goal, beyond "I can do it!!!" ? Is the point to test players' ideas before saying Chris/Keith: "it's okay, you can do that"?
Please excuse my english: I'm not a native speaker. Don't hesitate to correct me.
Pumpkin>> Do I need another cure about paranoia on top of overexcitement?
Mal>> We play AI War, enthusiasm and paranoia are both required!

Offline Red.Queen

  • Full Member Mark II
  • ***
  • Posts: 191
  • Mad Hacker
Re: FTL and ship design mods?
« Reply #18 on: May 01, 2015, 08:17:08 PM »
 :) Thanks Pumpkin.  Hehe I suppose my modding devposts are rather AAR-like.  I got into the habit of doing that while working on SYABH both because I thought they were fun to write and share my thinking on design, and because there is so little documentation on how this method of modding is even done.

My own initial toehold had come from two offhanded posts from a guy tinkering with 7 Days to Die where he mentioned ILASM/ILDASM so I was able to start tracking down the tools I needed to reverse the C#, and another brief comment about the IL line numbering scheme that cleared up another question I had.  I decided once I started to get the hang of this kind of work that I would talk through what I do so there would be more information out there on how this is done.  It's not a full-blown "manual to MSIL modding" but it's a breadcrumb trail that someone who was interested enough could at least get some clues on how to get started.

Not that I ever expect sane people to bother with doing this, it's very time-consuming to write even small chunks of code in this language.  It's about as close to the metal as you can get before moving into the world of directly manipulating memory registers (and you CAN specifically read and write a given memory address from Assembly, if you want to) and binary.

In other words, it's sort of a pidgin language that humans can use when speaking to the machine -- and you have to think like the machine too in a lot of ways ("I have 8 slots available on the stack, I need to remember these 5 things and the order they are in, now I remove two and add three things back and then I do this last operation and all 6 things then produce the answer...").  Then you add in the detective-work involved every time I have to call anything in a Unity library...

As much of a headache as it can be/often is though, it's also very cool.  Working in it will teach you a lot about what the machine is actually doing, and there's something I find rather beautiful about its pure, no-frills functionality and logical clarity -- it's the essence of "no bullsh!t".  There is no ambiguity -- only A then B then C, tiny building-blocks of logic like atoms combining to produce emergent, sometimes chaotic complexity from predictable simplicity.

Sorry, I get a little poetic when I program sometimes.  :)

***

Pulling my head out of the digital clouds for a moment, the question about what my goal with all this is and what I'm up to.  Fair questions!

Well... I needed a test case to confirm that there were no initial obstacles to working on this particular game, so "I can do it!!!" was definitely a big part of it.  :)

Beyond that, it's mostly a cocktail of challenge-seeking and data-craving (must acquire new information, always, all the time!), plus the love of customizing my games to exactly what I want, whenever I want.  I also happen to like the atmosphere on these boards, the vast majority of people are polite and friendly here, so I'm inclined to share my work rather than just hoarding it.  If someone happens to want to use something I posted, great, if not, no big deal, everyone prefers different things in their game.

There's the added bonus of sharing here with the sociable devs in case they see something that saves them trouble, or that they like, either in whole or in part, or just makes them smile to see someone tinkering with their baby and exploring how it works.

Otherwise, the stuff currently getting mulled over to start with is trying some tweaks to Assault Transports, seeing what I can do to rework Beachheads into something I would want to try playing with, and maybe playing with cloaking and the AI.  All this Transport-talk made me think "wouldn't it be HORRIBLE if higher-mark Carriers could cloak like the player ATs?"  Or upgrading something with a cloaking aura so it has mobile cloak-sharing.

A common rule I have when thinking of stuff to do is that if it makes me laugh evilly when it pops into my head, it's an idea worth exploring.  >D  I also have a habit of trawling for forum posts discussing balance/ideas/etc to look for inspiration, either for new stuff to build or to identify potential balance quirks that might benefit from changing.  Saves me the trouble of having to run into every thing myself if I see a good discussion of other peoples' experiences that have plenty of hard data and persuasive arguments for why X should be Y instead.

Maybe I should post an open suggestions/brainstorming thread in this subforum or something, dunno -- that might get peoples' hopes up a bit too much on what I can/am willing to do.  I am a selfish creature who will generally work on what amuses ME most, first.  (It's *my* time, sanity, and alcohol supply that's getting spent, so I am going to get the stuff on my own wish list first.  ;) )

There are many possibilities, and I haven't even finished exploring the codebase yet.  :)
Infiltrating hostile AI networks to rewrite reality.

[[Hacks available from this unit found on the AI War Modding subforum.]]

Offline Traveller

  • Jr. Member Mark III
  • **
  • Posts: 94
Re: FTL and ship design mods?
« Reply #19 on: June 02, 2015, 02:53:03 PM »
Hey Red.Queen, what's the difficulty for changing basic ship stats (cost, energy use, caps, shots, damage, etc) without doing fancy stuff like teleporting?  Does that still need decompiling/recompiling?  I've got some ideas for turret changes that I want to experiment with and see how they play.