Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
Biohazard063
Posts: 405
Joined: Fri Feb 14, 2014 4:38 pm
Location: Out of bounds
Contact:

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Biohazard063 » Wed Nov 04, 2015 11:48 am

Continued messing around a bit more. Turns out the removal of the civilian sectors was necessary since going to one will once again allow you to pick the option you got at the start of the game.

meklozz wrote:I really hope I'm not just confusing you more. Really sorry if I am.


As for confusing me. Yes, you have (just read the entire post as I was occupied with something else the first time I replied on it). But by all means, don't feel bad about. Heck, I don't even understand what chain-loading events mean. Though I probably would if someone told me what it was.
Also, why is the requirement set to engines? Does it need to be a blue option that is always fulfilled? The ship I'm using this on starts with a scrap arm.
In any case, what I want is to incorporate USB into my mod so people don't have to download USB separately. Keeping things easier for the player and all that. But credit will be given to kartoflane for the USB and at this point you're going on the list as well. :D

So this :

Code: Select all

<mod:findName type="event" name="START_BEACON">
  <mod-append:choice hidden="true" req="SCRAP_COLLECTOR">
    <text>Open the encrypted file</text>
      <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<mod:findName type="event" name="START_GAME_BEACON">
  <mod-append:choice hidden="true" req="SCRAP_COLLECTOR">
    <text>Open the encrypted file</text>
    <event load="INITIAL_START_BEACON_SCRAPPER"/>
  </mod-append:choice>
</mod:findName>

<event name="START_GAME">
   <text>You are a scrap ship constructed by the rebels and designed to recover usable parts from decomissioned ships or those destroyed in battle and scrap whatever is beyond salvaging. You're next objective has just come in.</text>
</event>

<event name="INITIAL_START_BEACON_SCRAPPER">
   <text>"Scrapper S-158B : Proceed to the designated beacon. Carry out protocol A-1 : Scan, recouperate, scrap, deliver. Additional information : Area location of recent rebel-lanius skirmish. Size : minor. Hazard : None. End of message. </text>
   <choice hidden="true">
      <text>Continue...</text>
      <event>
         <text>"Response recieved, awaiting completion of order."</text>
         <quest event="SCRAP_BEACON" />   
      </event>      
   </choice>
</event>

Needs to become what if I want to keep the text I'm getting the way it is now whilst making it compatible with say CE ? (Not looking into making it compatible with other ship mods as that would break the story I'm setting up with this ship anyway.)
As in at the start of the game the first box reads what's under "START_GAME" with the options : Open the encrypted file, followed by what is written under INITIAL_START_BEACON_SCRAPPER

And I'm guessing the sector_data :

Code: Select all

<mod:findName type="sectorType" name="CIVILIAN">
       <mod:findLike type="sector">
         <mod:selector>CIVILIAN_SECTOR</mod:selector>
         <mod:removeTag />
      </mod:findLike>
</mod:findName>

Needs to become something like this :

Code: Select all

<mod:findName type="sectorDescription" name="CIVILIAN_SECTOR">
   <mod-overwrite:startEvent>MOD_START_BEACON_CIVILIAN</mod-overwrite:startEvent>
</mod:findName>

Now, the thing is, the code I found for sector_data comes from the auto-terminator mod from RAD-82. The thing is, when I look in the event files for that mod, there is no event called MOD_START_BEACON_CIVILIAN

All this just to get an interesting start. People better appreciate it ! :lol:
Amateur modder and Let's player (with a substantial FTL and ItB LP featuring countless mods).
Channel link
A list of all my mods can be found here.
meklozz
Posts: 349
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby meklozz » Wed Nov 04, 2015 1:47 pm

From the start:

I know about civilian sector getting the same event as the starting one, that's why USB adds this to sector data:

Code: Select all

<!-- This sets the framework in motion. Don't change this. -->
<mod:findName type="sectorDescription" name="STANDARD_SPACE">
    <mod-overwrite:startEvent>START_GAME_EVENT</mod-overwrite:startEvent>
</mod:findName>


That way, you're actually changing the starting event, not the ones in the civilian sector. If you change the civilian sector ones, then you'd have to add those as well, and I'm not entirely sure it would work, because, even now, the civilian sector's starting event doesn't appear to load the same event as the first sector, but it does.

Engines are there because I couldn't be bothered to create an augment for testing and putting it on the ship, don't mind them.

For chain-loading, read carefully through the USB thread. If you want to include it in your mod, you should try and figure it out, took me a few minutes the first time around, too. Basically, any time a mod with USB support is added, it renames START_GAME_BEACON to something else, like BIOH_START_GAME_BEACON, then creates a new START_GAME_BEACON and makes sure that it will end by loading BIOH_START_GAME_BEACON, ensuring everyone's events get loaded.

The end result is something like:

START_GAME_EVENT (with text from start_game) >> START_GAME_BEACON >> MEK_START_GAME_BEACON >> BIOH_START_GAME_BEACON >> START_GAME_CHOICES (mutually exclusive)

You might want to use game_choices, since it should only be activated if someone's actually flying the ship. Game_beacons get triggered on each start, although without the blue option, it wouldn't matter much.

As for the start_game text being what you want it, that's kind of opposite of the point of USB, since you're butting in with your lore before anyone else's. For compatibility with USB, you'd probably want that text after you make the check for Scrap Recovery Arm, so the game knows you're flying the right ship. I mean, do what you will, but if you only want compatibility with CE, USB is not really necessary.

In fact, CE doesn't seem to actually support USB at all. All you need to do is make the standard sector spawn another event, like USB does, but with your own name, and then create that event that will do what you want, change start_game text (as you already did), and try and make you event end with loading START_BEACON, so you get all the CE stuff like peeking at the random flagship and crafting and talking to crew.

Hope you figure it out, kind of want to play the actual ship at this point :D
User avatar
Biohazard063
Posts: 405
Joined: Fri Feb 14, 2014 4:38 pm
Location: Out of bounds
Contact:

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby Biohazard063 » Wed Nov 04, 2015 3:52 pm

meklozz wrote:Snip

I do remember CE not supporting USB, so all things considered, we are getting really close.
As far as not getting CE's standard options, we're fine on that as well I believe. If I don't really care about compatibility with other ship mods.
There is no crew to talk to at the start and the only option as far as fabricating on board goes would be another scrap arm, which you don't have the scrap for at the start anyway.
So basically, it boils down to finding a way to not have to remove the other civilian sectors. Which I'm guessing is where that sector_data code comes into play.
I'll get that figured out (which hopefully doesn't take too long as testing will require me to find another civilian sector). Other than that, the ship is ready to go...

Thanks for the help (again).
Amateur modder and Let's player (with a substantial FTL and ItB LP featuring countless mods).
Channel link
A list of all my mods can be found here.
User avatar
RAD-82
Posts: 788
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby RAD-82 » Wed Nov 04, 2015 4:18 pm

Biohazard063 wrote:Now, the thing is, the code I found for sector_data comes from the auto-terminator mod from RAD-82. The thing is, when I look in the event files for that mod, there is no event called MOD_START_BEACON_CIVILIAN

My Auto-Terminator code that you are trying to use:

Code: Select all

sector_data.xml.append

<mod:findName type="sectorDescription" name="CIVILIAN_SECTOR">
   <mod-overwrite:startEvent>AT_START_BEACON_CIVILIAN</mod-overwrite:startEvent>
</mod:findName>

events.xml.append

<mod:findName type="event" name="START_BEACON">
   <mod:setAttributes name="AT_START_BEACON_CIVILIAN" />
</mod:findName>

<event name="START_BEACON">
   <text>(Auto-Terminator) Accessing DNA data...</text>
   <choice req="ANY_CREW" lvl="0" max_lvl="0" blue="false">
      <text>Clone Hunter...</text>
      <event>
         <text>Hunter is ready for battle!</text>
         <crewMember amount="1" class="human" all_skills="2">Hunter</crewMember>
         <choice hidden="true">
            <text>Continue...</text>
            <event load="AT_START_BEACON_CIVILIAN" />
         </choice>
      </event>
   </choice>
   <choice hidden="true">
      <text>Continue...</text>
      <event load="AT_START_BEACON_CIVILIAN" />
   </choice>
</event>

<mod:findName type="event" name="START_GAME_BEACON">
   <mod:setAttributes name="AUTOTERMINATOR_START_GAME_BEACON" />
</mod:findName>

<event name="START_GAME_BEACON">
   <text>(Auto-Terminator) Accessing DNA data...</text>
   <choice req="ANY_CREW" lvl="0" max_lvl="0" blue="false">
      <text>Clone Hunter...</text>
      <event>
         <text>Hunter is ready for battle!</text>
         <crewMember amount="1" class="human" all_skills="2">Hunter</crewMember>
         <choice hidden="true">
            <text>Continue...</text>
            <event load="AUTOTERMINATOR_START_GAME_BEACON" />
         </choice>
      </event>
   </choice>
   <choice hidden="true">
      <text>Continue...</text>
      <event load="AUTOTERMINATOR_START_GAME_BEACON" />
   </choice>
</event>


The sector_data code adds a new startEvent to the civilian sector, so that it won't use START_BEACON. Then in events, I find the START_BEACON code and rename it to the new civilian startEvent that I just added. Next I added the new START_BEACON which will no longer be called at the start of civilian sectors, but is still used at the start of the game.

The last two bits of code with the START_GAME_BEACON are for USB compatibility, because there is the Infinite Space mod which I put the USB into when I updated it for AE. It is just the basic USB chain-loading code.

I'll get that figured out (which hopefully doesn't take too long as testing will require me to find another civilian sector).

I will point out that CE has custom civilian sectors to avoid this start beacon nonsense, so you have to test it without CE.
Image
Junkyard has FTL mods, mostly ships and a few other things.
meklozz
Posts: 349
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby meklozz » Wed Nov 04, 2015 4:54 pm

That looks great, you should go with that. I think you can still add USB to that if you add the lines at the beginning of each file.
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am
Location: The Shrike
Contact:

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby stylesrj » Fri Nov 13, 2015 2:21 am

What would happen if you applied a negative number to a weapon's firing speed?

Would the gun fire backwards in on itself or go even slower? Or does it just go back into the positives, so a speed of -30 is the same as +30?

In fact, what would negative numbers do to certain stats? Negative hull makes you invincible?
FearTheBlaziken
Posts: 46
Joined: Mon Feb 23, 2015 6:25 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby FearTheBlaziken » Fri Nov 13, 2015 11:51 am

I want to make a mod where the first two phases of the Final Boss are two Different ships (Last phase is a Full Version of the Flagship), will the enemy window stay the same if i changed the stats and art of the boss blueprints? ("BOSS_1_DLC", "BOSS_1", etc.)

Also is the Flagship's Jumping Animation Hardcoded?
Image

I polish other mods because I am too lazy to make my own.
LehGogh
Posts: 38
Joined: Tue Jun 02, 2015 4:16 pm

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby LehGogh » Sun Nov 22, 2015 8:41 pm

Take in this chunk of example code:

Code: Select all

<eventList name="TEST_EVENT_LIST">
   <event>
      <text>Here's a reactor upgrade!</text>
      <upgrade system="reactor" amount="1"/>
   </event>
   <event>
      <text>Here's an engine upgrade!</text>
      <upgrade system="engines" amount="1"/>
   </event>
   <event>
      <text>Here's a cloaking upgrade!</text>
      <upgrade system="cloaking" amount="1"/>
   </event>
</eventList>


Would the game pick the cloaking upgrade event from the list if the player did not have the cloaking system installed? If so, is there a way for me to make an event's selectability dependent on the presence of a system? (This would be the equivilent of the requirement tag for choices. By the way, does the requirement tag work on events?)
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am
Location: The Shrike
Contact:

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby stylesrj » Sun Nov 22, 2015 9:02 pm

I think it'd pick one at random and if you already have it, they won't install it.

You know those fights or missions where you have to escort a ship or save a ship and they're like "Thanks for doing that job for us. Have a Repair Arm" or "Thanks for saving our lives. You took no damage from the fight, but let us patch up your hull!"
If your reactor is maxed out, they'll still try and fail to do so.
So even if you don't have the system they wanna upgrade, it will not affect the odds of getting that outcome.

I don't think adding requirement tags will solve the issue as they only work on <choice> tags.
meklozz
Posts: 349
Joined: Wed Sep 23, 2015 9:11 am

Re: Questions here: an inquiry thread! [Updated Sep 15th, 2014]

Postby meklozz » Sun Nov 22, 2015 10:02 pm

It's even got it's own pretty text and all!

Image

It shouldn't be too much of a problem to hide a requirement in a choice before loading the event, as long as there is at least one. You'd likely have to create event lists for every possibility, though. Maybe there is some other workaround, depending on what exactly you want to do.

@
It might indeed be too much of a problem. Even a 3 system choice would probably be.. troublesome with just one choice, maybe with more as well.

@@
Actually not too much of a problem as long as you don't try to check for maxed out systems (it won't upgrade beyond full, similar message to the one in the screen), just their existence. You could do this with additional choice check or two in the eventlists, though.

There are some quirks to making the choice req tags work like you want them (under a single 'Continue...' is best, I guess?), but I could throw some ready events your way if you want.

Who is online

Users browsing this forum: No registered users and 10 guests