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: Simulator Enhancements (03/13/24)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Professor Pinkie

Pages: [1] 2
1
Minor update.

Some built-in hullmods added. Now, spaceships have little more flavor

2
Perfect! Works as it should. I forgot ship.giveCommand part.

Thank you very much!

3
Please forgive my obsession, but I'm here again.

So, I'm trying to make a simple hullmod that will force the ship to automatically venting when the condition is met. There were no problems with defining the condition. But for the third hour now I have been fighting the venting command. Everything should be simple, since in ShipCommand.java it is not at all difficult to find that it is VENT_FLUX.

But here my hands, growing out of ***, prove themselves! Can someone give a ready-made string to execute the command?

4
Modding Resources / Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« on: July 05, 2020, 10:11:11 PM »
Silly me.

This is exactly what I was trying to do. My problem was: "eficiency_overhaul" instead of "efficiency_overhaul" in MagicIncompatibleHullmods.removeHullmodWithWarning(stats.getVariant(), "eficiency_overhaul", "my_hullmod");

In the future, I should read the log before asking people questions.

I apologize most deeply.

5
Modding Resources / Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« on: July 04, 2020, 12:31:54 PM »
Can anyone tell me any mod using MagicIncompatibleHullmod?

I want to see how it should work.

6
It doesn't necessarily have to, just fyi.
Spoiler
1) Copy the hullmod from the source into your own hullmods folder. Add your check to the code. Give it a unique name.

2) Copy the line from hullmods.csv and in the script column point to your unique one instead of the vanilla one. Leave everything else unchanged.

3) For your mod id, add some "??" before it.

csv files merge and any duplicate entries of vanilla ids outside of vanilla (so from other mods trying to edit this as well - vanilla will be overridden in any case) are loaded and overridden reverse-alphabetically. Adding the "??" ensures that you will be the first one loaded and so the first one overridden if another mod also edits it.

That should handle any incompatibility with other mods - though it will in-turn allow the user to equip both hullmods when it is built-in in the case that another mod does override your check so be aware of that for troubleshooting purposes.
[close]

Yes, mister, that works. I did so initially, but I do not like this method. A little earlier or a little later this will lead to this:
Spoiler
[close]

I really should make magiclib work. Well, I'll go ask in the appropriate thread.

Anyway, thanks!

7
Quote
(I'm not familiar with MagicLib but are you sure you have the parameters in the correct order? That's one thing that could be going wrong. Does the log say anything?)

I am sure that the order is wrong. Other would be strange. I did not save the log.

Quote
It is interesting to me that the built in part of this matters. Rather, can you not equip your hullmod first and then be able to equip efficiency overhaul because it doesn't contain a check for your hullmod? If you can't, it might be related to the utility mod cap and that is why it seems to need to be built in, I'd think, though I could be wrong.

Built-in matters. If I add my hullmod first (not built-in), and then efficiency overhaul, my hullmod removes itself from the build and can not be equipped until efficiency overhaul is removed. In this state, the rule is fulfilled, although in one direction. But if I made my hullmod built-in, it is possible to add efficiency overhaul, while my hullmod remain active (can not be removed?).

I can’t add lines to the vanilla code. and rewrite it completely - create compatibility issues.

8
I don’t want to offend Mr.Tartiflette in any way, but every time I try to figure out his scrolls, I want to cry.

Not because the library is bad, but because I know Java so well, that I make two mistakes when I just write "Java". Glory to the spell checker!

In this particular example, I can only guess what needs to be done. My best guess is:

1.Add this to the title:
Code
import data.scripts.util.MagicIncompatibleHullmods;
import data.scripts.util.MagicTxt;
import static data.scripts.util.MagicTxt.getString;

2. And this to the body:
Code
if(stats.getVariant().getHullMods().contains("efficiency_overhaul")){

   MagicIncompatibleHullmods.removeHullmodWithWarning(stats.getVariant(), "efficiency_overhaul", "my_hullmod_name");

}

And it ain't work... And I am not surprised. ;D

Vanilla scripts, made by Alex are more intuitive to me for <profanity> reverse engineering.

9
So, I made a simple hullmod. And it works as it should. How do i make it incompatible with specific hullmod (efficiency overhaul)? I can always:
Code
@Override
public boolean isApplicableToShip(ShipAPI ship) {
return !ship.getVariant().getHullMods().contains("efficiency_overhaul");
}

public String getUnapplicableReason(ShipAPI ship) {
if (ship.getVariant().getHullMods().contains("efficiency_overhaul")) {
return "Incompatible with Efficiency Overhaul";
}

That will prevent my mod to be used with Efficiency Overhaul, but it will not prevent Efficiency Overhaul to be installed if my mod is built-in.

Shall I add some strings to EfficiencyOverhaul.java somehow? Or even overwrite it? There should be an easier way.

Also, which is the best way to make randomly generated NPC variants obey that rule?

10
Minor update. V0.1c.

-Default ship roles assigned for hulls.
-Added three new recolored Odysseys.

Loyalty, a fast carrier.
[close]
Endeavour, civilian survey ship. Special thanks to Sinosauropteryx for code stolen. Significantly less rare compared to other hulls.
[close]
Old Warrior. True beast of battlefield!
[close]

As an always, suggestions are welcomed.

11
Yes, gentleman, I am aware of this.There is no difficulty creating new styles in hull_styles.json and engine_styles.json respectively. This is what I want to avoid. You see, I do not want to create styles since they will be applied only to a single ship, and they will be almost complete copies of vanilla, except for a couple of lines.

Let’s go on the other side. We can change the color of covers in .ship files via "coversColor": "R,G,B,T", It would be great to be able to:

"style": "HIGH_TECH",
"shieldRingColor":[R,G,B,T],
"shieldInnerColor":[R,G,B,T],

But I doubt it will work. Alternatively, determine a style directly in a .ship file. Is it possible?

Spoiler
Code: Can I put this directly to a .ship file?
"style":{
"hyperspaceJitterColor":[100,165,255,200],
"baseCampaignExplosionColor":[100,165,255,255],
"baseCombatExplosionColor":[100,165,255,255],
"fighterRepairFlickerColor":[100,165,255,255],
"fighterChipIconColor":[100,165,255,255],
"weaponDisabledExplosionColor":[100,165,255,255],
"shieldRingColor":[X,Y,Z,A],
"shieldInnerColor":[X,Y,Z,A],
"fluxVentCoreColor":[255,255,255,255],
"fluxVentFringeColor":[125,0,155,255],
"engineLoopSet":"engine_loop", # id of entry in sounds.json
"engineAccelerateSet":"engine_accelerate", # id of entry in sounds.json
"empLoopSet":"emp_loop", # id of entry in sounds.json
"fluxLoopSet":"flux_loop", # id of entry in sounds.json
"ventFluxSet":"vent_flux", # id of entry in sounds.json
"shieldBurnoutSet":"shield_burnout", # id of entry in sounds.json
"shieldLowerSet":"shield_lower", # id of entry in sounds.json
"shieldRaiseSet":"shield_raise", # id of entry in sounds.json
"explosionShipSet":"explosion_ship", # id of entry in sounds.json
"damageDecalSheet":"graphics/damage/damage_decal_sheet_base.png",
"damageDecalGlowSheet":"graphics/damage/damage_decal_sheet_glow.png",

#"colorShiftCovers":true,
"coversColorShiftAmount":1,  # 0 to 1
"coversMatchShipBrightness":true,
"slotCoverSmallTurret":"graphics/weapons/covers/cover_turret_hightech_small.png",
"slotCoverSmallHardpoint":"graphics/weapons/covers/cover_hardpoint_hightech_small.png",
"slotCoverMediumTurret":"graphics/weapons/covers/cover_turret_hightech_medium.png",
"slotCoverMediumHardpoint":"graphics/weapons/covers/cover_hardpoint_hightech_medium.png",
"slotCoverLargeTurret":"graphics/weapons/covers/cover_turret_hightech_large.png",
"slotCoverLargeHardpoint":"graphics/weapons/covers/cover_hardpoint_hightech_large.png",

"dHullOverlayLight":"graphics/damage/dmod_overlay_hightech_light.png",
"dHullOverlayMedium":"graphics/damage/dmod_overlay_hightech_medium.png",
"dHullOverlayHeavy":"graphics/damage/dmod_overlay_hightech_heavy.png",
},
[close]

12
Is there a fast way to give a specific hull a unique shield color without creating a hull style?

P.S. Same question for engine jets.

13
Modding / Re: The black magic behind "modules on modules"
« on: June 22, 2020, 10:03:01 AM »
The code was shamelessly stolen by me!

Works. Roboarm dangles as it should!
Spoiler
[close]

I bet, the author did not expect his creation to be used for a useless decorative element.

Thank you!

14
Sir, this is exactly what I need!

Unfortunately, I barely understand Java, and therefore I can hardly reproduce the logic. Can I just steal this splendor "symbol to symbol"? However, even in this case I’m not sure that I will succeed. Worth to try.

15
Hello again!

I encountered a problem, trying to create a chain of station modules, something like that:

Main hull -> module A -> module B -> module C.

The point is that if a player loses module C, he still has others, but if he loses module A, then all subsequent modules destroyed with it.

The problem is that the game persistently loads only the main hull and module A, but not the subsequent ones. I suspect that I ran into a wall of vanilla functionality. So the question is: am I doing something wrong or is an additional plugin really needed here? All the same, I would like to stay within the vanilla, if possible.

Thank you!

Pages: [1] 2