Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Codex Overhaul (05/11/24)

Pages: 1 ... 197 198 [199] 200 201 ... 717

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1760149 times)

Obsidian Actual

  • Commander
  • ***
  • Posts: 106
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2970 on: September 29, 2016, 01:27:58 AM »

Hello again,

This might be a bit of a stretch... but after seeing the work Dark.Revenant did with LWJGL to create a custom GUI element for his Knight's Templar mod, I was wondering just how much of the vanilla combat widget GUI could be expanded upon by modders.

Granted, Dark.Revenant had to go through the trouble of (I think) mathematically calculating an [x,y] Vector2f offset (based off how the Weapon Group GUI widget is rendered) to determine where to dynamically place his Priwen Burst "cooldown meter" GUI element, but I was thinking something simple, like rendering additional text elements using the same font face as the base GUI, but you could determine both its position on the GUI and font color etc.

Spoiler
This was spawned from me playing around with BaseShipSystemScript's getInfoText(), and realizing that I couldn't change the position on the combat widget where the string is rendered, let alone a way to change the color to orange, like the way that the isDebuff boolean for the maintainStatusForPlayerShip() method in the CombatEngineAPI() changes the description text from green to orange. Since I doubt the likelihood is high of Alex going through the trouble of editing the codebase/API just to satisfy this selfish little gimmick of mine, I was wondering if I could instead "overlay" new GUI text elements using LWJGL like how Dark.Revenant did, but with the same font face as the vanilla GUI so that it doesn't look too out of place.
[close]
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2971 on: September 29, 2016, 01:40:44 AM »

The answer is easy: None of the UI is modifiable by mods. You only can draw on top manually, and you can only draw rasterized text.
Logged
 

Obsidian Actual

  • Commander
  • ***
  • Posts: 106
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2972 on: September 29, 2016, 02:14:37 AM »

Yeah, I figured as much. I'll try looking into how to code LWJGL (probably some way to invoke Graphics2D.drawString), but from the sounds of it, I may have to end up painting in each letter as a textured quad one at a time, like you said. At least I found the Victor10 font in the core graphics directory, so there's that.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2973 on: September 29, 2016, 03:11:01 PM »

Rendering text is not basic graphics programming - you need a solid foundation in OpenGL and how fonts/text work.  There are books on this subject that you could read.
Logged

whatdoesthisbuttondo

  • Lieutenant
  • **
  • Posts: 90
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2974 on: October 01, 2016, 06:33:53 AM »

Anyone know an easy way for playtesting custom ships?

My current approach is to make a new savegame, grab 2-3 20k bounties and then save at a market station.

Then my basic loop would be to make adjustments or add new ships, edit the savegame so that they are available for purchase at that station and buy them to test out in sumulator battles.

Problem obviously is the limited availability of equipment at the market, haven't figured out yet how to edit in modules in my savegame.

I guess I could make a savegame with enough modules stored, but that kinda takes a while and if I don't want to make it extremely tedious I'll have to level up my character and officers (which I do not really want, makes it hard to judge balance for early-game) and build relations to get a good supply of high-end modules.

Is there a better way to do this?

Or maybe someone has a pre-edited savegame for this kind of thing they're willing to share?
Logged

mangalore

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2975 on: October 01, 2016, 06:47:09 AM »

I also have a small question concerning custom ships. My issue is I added two custom ships to the Mayorate faction, one heavy cruiser and one dreadnaught level ship. I find the heavy cruiser in high level dock yards of the Mayorate easy enough so the custom ship gets spawned but I can't find the dreadnaught level ship. Checking save files there are reference of the big ship in fleets but I wonder how I can test if everything is working for the buying and selling section?

Increased likelyhood of the dreadnaught class ships in the Mayorate faction but not sure how to best find out if it would be available properly.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2976 on: October 01, 2016, 09:13:57 AM »

Anyone know an easy way for playtesting custom ships?

My current approach is to make a new savegame, grab 2-3 20k bounties and then save at a market station.

Then my basic loop would be to make adjustments or add new ships, edit the savegame so that they are available for purchase at that station and buy them to test out in sumulator battles.

Problem obviously is the limited availability of equipment at the market, haven't figured out yet how to edit in modules in my savegame.

I guess I could make a savegame with enough modules stored, but that kinda takes a while and if I don't want to make it extremely tedious I'll have to level up my character and officers (which I do not really want, makes it hard to judge balance for early-game) and build relations to get a good supply of high-end modules.

Is there a better way to do this?

Or maybe someone has a pre-edited savegame for this kind of thing they're willing to share?

Add it to a mission and test there.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3805
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2977 on: October 01, 2016, 09:25:44 AM »

Is there a better way to do this?
Use the console commands mod - you can add ships and weapons directly to your inventory with that.
Logged
Wyvern is 100% correct about the math.

DrakonST

  • Captain
  • ****
  • Posts: 341
  • Lizard-Wizard
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2978 on: November 15, 2016, 02:04:17 AM »

Somebody can explain to me how to correct it? It mod "Valkyrian" at independent start of a new game.
Code
71128 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.StarSystemAPI.initStar(Ljava/lang/String;Ljava/lang/String;FFF)Lcom/fs/starfarer/api/campaign/PlanetAPI;
java.lang.NoSuchMethodError: com.fs.starfarer.api.campaign.StarSystemAPI.initStar(Ljava/lang/String;Ljava/lang/String;FFF)Lcom/fs/starfarer/api/campaign/PlanetAPI;
at data.scripts.world.valkyrianSystem.generate(valkyrianSystem.java:84)
at data.scripts.plugins.VKSModPlugin.onNewGame(VKSModPlugin.java:39)
at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
at com.fs.starfarer.ui.M.dismiss(Unknown Source)
at com.fs.starfarer.ui.impl.I.dismiss(Unknown Source)
at com.fs.starfarer.campaign.save.if.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.interfacesuper.o00000(Unknown Source)
at com.fs.starfarer.ui.H.processInput(Unknown Source)
at com.fs.starfarer.ui.U.super(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Logged
I a Russian. And i communicate with the help of Promt Translate. And I am a color-blind person.

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2979 on: November 24, 2016, 02:23:26 PM »

Hi guys. Has anyone ever made a mod that increases the quantity of ships/weapons/cargo found in markets?
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Kaucukovnik

  • Ensign
  • *
  • Posts: 39
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2980 on: November 25, 2016, 01:11:29 AM »

Could the AI handle a ship with the majority of firepower being missiles directed backwards + engine boost?
The idea is to get past enemy ships and hit behind their shields (provided they don't have a 360 shield already on). Is there a way to trick the AI to charge further than it intended to accomplish this? Would that make it overly suicidal? Could missiles with good tracking help the AI use the ship in semi-regular fashion at least?
Logged

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2981 on: November 28, 2016, 08:13:13 AM »

Hi guys. Has anyone ever made a mod that increases the quantity of ships/weapons/cargo found in markets?

I mean to say, Starsector feels like "Emptysector" and it would be nice if markets were stocked with a greater variety and amount of cargo and ships than is currently stored there, to change the theme of the game to "Plentysector"
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24328
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2982 on: November 28, 2016, 10:18:42 AM »

Could the AI handle a ship with the majority of firepower being missiles directed backwards + engine boost?
The idea is to get past enemy ships and hit behind their shields (provided they don't have a 360 shield already on). Is there a way to trick the AI to charge further than it intended to accomplish this? Would that make it overly suicidal? Could missiles with good tracking help the AI use the ship in semi-regular fashion at least?

It probably wouldn't work consistently well. The only thing that comes to mind is writing a custom AI for a custom ship system, sort of like a burn drive but where the AI would trigger it with the intent to overshoot. But it'd be gimmicky at best and I expect would get mauled badly in anything other than a 1-1 fight.


Hi guys. Has anyone ever made a mod that increases the quantity of ships/weapons/cargo found in markets?

I mean to say, Starsector feels like "Emptysector" and it would be nice if markets were stocked with a greater variety and amount of cargo and ships than is currently stored there, to change the theme of the game to "Plentysector"

You'd need to have an IDE set up and tweak BaseSubmarketPlugin/some extending classes. The tweaks themselves would be pretty simple.
Logged

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2983 on: November 29, 2016, 03:32:44 PM »

How would you replace a .java class from ../com/fs/starfarer/api/.. with a custom one that you wrote?

I created a .jar file with my custom class and included the "jars" line in the mod_info.json file. However, there has been no effect on the game (including no crashing).
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2984 on: December 02, 2016, 01:38:06 PM »

Could I get the syntax for adding built in weapons with skin files?

tried:
 
Code
		"WS 016":{"hvygatlinglaser"},
"WS 017":{"hvygatlinglaser"}

inside of:
Code
"builtInWeapons":{
    },

That didn't work. I tried to find a working example and there isn't one in Vanilla. Thanks!  :)
Logged
Pages: 1 ... 197 198 [199] 200 201 ... 717