Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Updated the Forum Rules and Guidelines (02/29/20); Blog post: GIF Roundup (04/11/20)

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 - LazyWizard

Pages: [1] 2 3 ... 92
1
Modding / MOVED: [0.9.1a] Va11 Hall-A Portrait Pack
« on: March 02, 2020, 05:42:16 PM »

2
Modding / MOVED: [0.9.1a] Shadowy Broker (v0.2.7 - 2020/02/09)
« on: February 11, 2020, 08:10:23 AM »

3
Mods / Re: [0.9.1a] Version Checker v2.0 (released 2019-03-19)
« on: February 01, 2020, 01:58:09 PM »
Hey, Love the mod. My work computer has a not-ideal certificate situation, so many requests over https don't pass certificate inspection. Is there a way you can put in an option to disable certificate checks in your mod?

It's possible, but not something I'm willing to do. I'd have to write my own trust manager that'd affect every network connection made by Starsector, which would mean disabling certificate validation for any future mods that connect to a network. Even as a hidden option this is a Bad Idea.

Though one question: if you're playing behind a locked down corporate network, how would this change help? Most mod downloads are hosted on the same sites the version files are, so even if Version Checker could see when there are updates available you wouldn't be able to download them in your browser.

If you're desperate, you could always go with the tried-and-true method of setting up an SSH tunnel to your home computer and directing all traffic through that. I take no responsibility if your IT staff catches this and you get fired.

4
Modding Resources / Re: [0.9.1a] LazyLib v2.4f (released 2020-01-31)
« on: January 31, 2020, 12:03:27 AM »
Version 2.4f is up, get it here.

This update adds no new features, and is purely a housekeeping release due to the upcoming deletion of the repository on Bitbucket. Hosting has been switched to GitHub, which as a bonus means the Javadoc is available online again.

Changelog:
Quote
2.4f (January 31, 2020)
=========================
Updated bundled Kotlin runtime library to v1.3.61
Javadoc is now available online at https://lazywizard.github.io/lazylib
Moved .version file hosting to GitHub

5
Mods / Re: [0.9.1a] Version Checker v2.0 (released 2019-03-19)
« on: January 29, 2020, 05:18:19 PM »
Important note for any modders that use Mercurial and Bitbucket for hosting their mod downloads or version files:

You've probably seen a warning about this if you've visited Bitbucket within the last few months, but just in case: Bitbucket has decided, in their infinite wisdom, to sunset Mercurial support on their platform. All existing Mercurial repositories, including issue tracking and downloads, will be deleted after June 1st. That means if you use Bitbucket and Mercurial for source control, even if it was just to create an empty repository to host your mod downloads/version files, you must either convert to git or another supported VCS, or move to another hosting platform, by the end of May.

Again, this will only affect you if you're using Mercurial. Git repositories are unaffected. You can check if you'll be affected by logging in to Bitbucket and visiting this page. Any repositories listed here must be converted before June or you'll lose everything. That includes copying any downloads you wish to keep over to your new repositories, as no conversion tool I've found will include them.

I've spent the last few hours converting a few dozen of my own repositories to git and moving them over to GitHub. GitHub has long since overtaken Bitbucket when it comes to the features available on their free plans, so it's what I would recommend if you're converting your repository anyway. GitHub's a lot less newbie-friendly, unfortunately, but since it's the most popular source hosting platform there are thousands of tutorials available online.

To move your repository from Bitbucket to GitHub, log in to GitHub and press the giant + on the top right, then Import Repository. Enter the base URL of your project (ex: https://bitbucket.org/LazyWizard/lazylib). GitHub will handle converting your repository from Mercurial to git for you. To move your downloads over, you'll have to tag a release (if you've made commits since your last release, click "Target: master" and switch from the branch tab to recent commits, then select the commit that represents your last release), then attach the mod zip so users can download it from the releases page. For .version file hosting, I recommend modifying your version file to link to the master copy in your master branch, then only pushing a .version file update when you've released an update.

7
Suggestions / Re: Save File Format (Game arcitecture)
« on: January 18, 2020, 02:31:13 PM »
The entire save file is loaded from disk and deserialized into the proper game objects when you first load your save. The game doesn't otherwise read the save file during gameplay. The only disk I/O downtime you'll run into is the actual saving/loading screens, and the slight delay when you jump into a system as it loads the background texture.

AFAIK, the lag when opening up some screens is due to game objects being created to populate the UI. I know mousing over a fleet with a large number of ships can cause the game to stutter noticeably as it generates each ship's stats card. I assume the colony screen has the same problem.

8
Mods / Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
« on: January 18, 2020, 12:51:37 PM »
Any way to change the shortcut to open the console window?

I dont have an English keyboard and I am unable to open the console with any combination of "CTRL+BACKSLASH".

I see someone already told you that it's actually control+backspace, but you can change the keystroke that summons the console with the Settings command.

If for some reason your keyboard doesn't have control or backspace, you can also change it manually by editing the "consoleKeystroke" field in saves/common/config/lw_console_settings.json.data. Set all the "true"s to "false" (these control if you need to hold shift, control, or alt), and the first number to the keycode of the key you want. Keycodes can be found here. If you wanted to summon the console by pressing 9, you'd look for VK_9, which has the keycode 57. So your "consoleKEystroke" would look like "consoleKeystroke": "57|false|false|false".

Yeah, using the settings command is much easier. :)


okay so for some reason what causes console command to crash... out of ALL THE THINGS IN EXISTANCE, is these two settings:

"decivSamplingMonths":16,
"decivMinStreak":3,

For some mystical reason, if you set these settings to bigger values (to prevent random deciv events) the game just refuses to open the console without crashing. I don't see how this is related but holy *** it took a lot of digging around to figure it out. Thing is for some reason changing those values after a save was created might or might not break console commands as well. I even tested it out and for some random reason sometimes it breaks it and other times its fine...

So there you go, I have no idea how this makes sense but hey, I didn't make the mod :3 

I think I also changed those values since I believe vanilla ones were smaller so I guess it has to do with back ground simulation freaking out.

That's incredibly weird. If anything I'd expect it to crash when the console closes, not when it first opens, since the game would be playing catch-up on however many thousands of frames it skipped. I'll look into it.


First off, I love the mod.

Though I'm having some issues, nothing crashing or anything, but i can't seem to get two commands to work..

Namingly \Clear\, and \Clear ships\

If I try storage\clear ships\ it says no such command
Storage\clear\ says the same thing

typeing in just clear simply clears the console, not my storage.

In reference to my earlier question, am I correct in assuming these clear commands are supposed to empty the storage? if so, how do I use them?

You want "storage clear" and "storage clear ships". I'll update Storage's help entry to be more clear (no pun intended).


Anyway there to ban me from this mod lol i cannot help but cheat once i found this and its bugging me. lol

A command to block access to the console on specific saves has been on my todo list for a while. I've just been lacking the motivation to mod for the last several months.


Ok. Current working code for adding planets is.
Code
 RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length) 
Code works great for spawning new planets in a star system. However, do you know how to spawn moons that orbit around a planet?

how to u get it to work? i get an unknown variable error for planet angle

@Coffeeboi: You'd have to do it manually. If you're docked with the planet you want to create a moon for, you can use $context.getEntityInteractedWith() as the anchor for an OrbitAPI you create, then spawn the moon with that orbit (which I _believe_ will handle the positioning of the planet for you).

@nuker22110: You need to replace the placeholder arguments. So Planet_Angle might be 140, Planet_Orbit_length might be 70, etc. You can find examples of addPlanet usage in starsector-core/data/scripts/world/corvus.Corvus.java. Runcode takes Java code as an argument, so checking the files in data/scripts is a good way to get ideas for how to use it.

Oh, and a general statement about runcode snippets: I'd recommend being _extremely_ careful with RunCode if you aren't a modder yourself. RunCode isn't a normal command. You're writing, compiling and running Java code at the same level as an actual mod, without any of the safeties the other console commands have to prevent you from breaking things. The benefit is that you can do almost anything a mod can do with this command, but the downside is you can ruin your savefile if you get something wrong, and mistakes might not be immediately apparent.

9
I remember there being a similar problem in the past with other removeX methods being called by the removed object (since they'd be doing so during iteration of the list they're contained in). However, for some reason this exception occurs even if I offload the removal onto a separate EveryFrameScript:

Code
runcode if ($context.isCampaignAccessible())
{
$sector.addTransientScript(new EveryFrameScript()
{
private boolean isDone = false;
public void advance(float amount)
{
$sector.getListenerManager().removeListenerOfClass(org.lazywizard.console.ConsoleCampaignListener.class);
isDone = true;
$print("Console disabled in the campaign until the next reload.\n");
}
public boolean isDone() { return isDone; }
public boolean runWhilePaused() { return true; }
});
}

Quote
226895 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)
        at java.util.ArrayList$Itr.next(ArrayList.java:859)
        at com.fs.starfarer.campaign.ListenerManager.removeListenerOfClass(Unknown Source)
        at SC$1.advance(Unknown Source)
        at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
        at com.fs.starfarer.campaign.CampaignState.advance(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(Thread.java:748)

10
Modding / MOVED: [0.9.1a] Player Station Construction (v2.4.0)
« on: January 08, 2020, 06:36:59 AM »

11
Modding / MOVED: [0.9.1a] Boggled's Terraforming Mod (v2.4.0)
« on: January 08, 2020, 06:36:45 AM »

12
Modding / MOVED: [0.9.1a] AI Core Production Industry (v1.0.0)
« on: January 08, 2020, 06:36:32 AM »

13
Mods / Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
« on: December 04, 2019, 07:27:36 PM »
Thanks for the report! You can "fix" this by opening saves/common/config/lw_console_settings.json.data and setting "showBackground" to false. I'll try to get a proper fix out soon.

To the others who've posted in this thread: I've read your posts. I'll try to get around to responding/adding the requested features soon! :)

14
Blog Posts / Re: Raiding for Fun and Profit
« on: November 27, 2019, 04:15:02 PM »
Quote from: Blog Post
Marines now gain experience from raids, and this translates directly into a generous increase in raid effectiveness, and a more modest reduction in casualties taken. Hiring new marines dilutes the experience and reduces the bonuses (no experience is lost, it’s just redistributed). It’s also possible to drop off experienced marines in storage, or in cryopods, and have them retain their experience level.

Is there any way to un-dilute this experience? If, say, I wanted to purchase and transport 1000 regular marines from point A to point B, is there a way to do this without permanently weakening the marines already in my fleet, aside from leaving them in storage first?

15
Modding Resources / Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
« on: November 19, 2019, 04:01:57 AM »
The file structure is <install directory>/mods/LazyLib/mod_info.json? And you tagged LazyLib in the launcher?

Pages: [1] 2 3 ... 92