Author Topic: Deciphering the API, and other Modding questions.  (Read 1781 times)

0 Members and 1 Guest are viewing this topic.

Offline iceball3 (OP)

  • Captain
  • **********
  • Posts: 454
  • Thanked: 47 times
Deciphering the API, and other Modding questions.
« on: August 08, 2021, 12:50:54 PM »
Use this thread to ask questions about modding, share findings on interacting with the API/engine/DB, and perhaps ask Kyle questions about the above if he's wanting to share. Kyle gave us this modding support so we might as well start putting it to good use!
Before anything else, make sure to grab a copy of Godot from https://godotengine.org/ , it's free, and it's the engine Quasar was written in. If you want to load up the examples, make sure to import the folder \[quasardirectory]\mods\examples to get started.

Additionally, given how Database involved Q4X is, i'd also recommend getting a database viewer, such as Database Browser for SQLite, as understanding the internal structure of the database might be crucial for any mod that changes ingame elements. I'd strongly recommend not implementing mods through the database directly, and instead use the API, as you can make sure your changes are reversible with it. Always back things up before making changes, too!
« Last Edit: August 08, 2021, 02:24:08 PM by iceball3 »
 

Offline iceball3 (OP)

  • Captain
  • **********
  • Posts: 454
  • Thanked: 47 times
Re: Deciphering the API, and other Modding questions.
« Reply #1 on: August 08, 2021, 01:12:11 PM »
Does anyone know where is a good spot to read about how definitions for weapon component and it's related component design infrastructure works? Being able to see how, for example, lasers work under the hood would definitely be a boon for any weapon-system mods, for either new weapons or modifications of existing ones.
Addendum: It seems like a lot of the definitions for beam weaponry is under the general ShipDesignComponents, which is useful. Currently trying to find out how damage profiles (the shape a given amount of damage carves out of the armor) is defined, as well as where the code for UI elements that can be used to define new beam weapon components are. Definitely beating my head against a wall here though.
End goal for this endeavor on my end is to implement a variant on plasma carronades that:
-Has an excessively wide damage profile, wider than missiles.
-Does more damage per ton
-Perhaps has an increased overall accuracy compared to other beam weapons
-Perhaps deals reduced damage against hulls that have armor too narrow to fit the whole damage profile.
-Perhaps can hit multiple missiles at once
Not all need to be implemented, but attempting to implement them at least might give some better understanding about how all this works
« Last Edit: August 08, 2021, 02:32:19 PM by iceball3 »
 

Offline TMaekler

  • Vice Admiral
  • **********
  • Posts: 1112
  • Thanked: 298 times
Re: Deciphering the API, and other Modding questions.
« Reply #2 on: September 03, 2021, 12:57:28 AM »
In regards to the idea to mod the wealth gain if people are on "short work" during a mineral crisis, I would need to find out where to hook into for modding the wealth calculations. Any ideas how to get to that information?
 

Offline trabber Shir

  • Warrant Officer, Class 2
  • ****
  • t
  • Posts: 63
  • Thanked: 13 times
Re: Deciphering the API, and other Modding questions.
« Reply #3 on: September 23, 2021, 08:50:33 AM »
Is the most recent version of .API.gd published anywhere?

I would have assumed the example mod, except I see that the default mod has a much higher version number and quite a few more exposed methods.