[MOD] AutoCrew

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Ezarkal
Posts: 1610
Joined: Wed, 22. Apr 15, 02:27
x4

Post by Ezarkal » Thu, 3. Nov 16, 14:00

Babberdeggl wrote:@Gabeux Autocrew doesn't work for me either, when i buy ships from npc shipyards. It does work if you have your own shipyards though. Therefore i guess you did everyting just fine. Try to capture a ship and if you get a crew on it, you are good.
I had the same problem. That's one of CWIR's functions. Blackrain made it so you will get crew if you buy from your own shipyard, but not if you buy from the NPC.
His crew script simply overwrite Autocrew's when it comes to buying ship. As you said, autocrew will still work when boarding ships.
Humans are deuterostomes, which means that when they develop in the womb the first opening they develop is the anus.
This means that at one point you were nothing but an asshole.

Some people never develop beyond this stage.

pref
Posts: 5589
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref » Thu, 3. Nov 16, 16:53

Babberdeggl wrote:I captured a Lyranea 2 times, both with cwir boarding.

The first time i captured it for myself which worked fine.
The second time for a other faction, which didn't work at all. After capturing was sucessfull, it didn't say that it belonged to the faction i was giving it to. It just said "Neutral" but it was supposed to say Family Ryk. Also there was no crew on board the new ship and my Marineofficer was gone.

I'll try testing station boarding when i get the chance.

cwir version was 1.60

@Gabeux Autocrew doesn't work for me either, when i buy ships from npc shipyards. It does work if you have your own shipyards though. Therefore i guess you did everyting just fine. Try to capture a ship and if you get a crew on it, you are good.

@pref about that new cwir version: i don't know when you downloaded the md folder from my link, but i switched the old version with the new one before you gave us the 3 files. Maybe you used already the new version?
I checked the files, and my edited version seems to be the same as the one i can download now from your link.

Can you upload a log file of the game where this neutral ship owner issue happened? I assume the game encountered an error, and stopped script execution before the boarding routine could execute fully.

I did not add the ship/station build part of autocrew as there is a logic for that in CWIR. Also i have no idea in what ways you can get a ship or a station in CWIR on top of the vanilla options so it could take me some time to figure this out.

facastefff
Posts: 20
Joined: Mon, 2. Feb 04, 15:17
x4

Post by facastefff » Thu, 3. Nov 16, 22:48

So I did some boarding as well on a fresh CWIR start, using the 3 files you provided earlier. Sadly I got no crew at all on the boarded ship and had to provide them myself.

Do I also need to install the AutoCrew mod, or should the three files be enough?

Babberdeggl
Posts: 77
Joined: Wed, 28. Apr 10, 00:05
x4

Post by Babberdeggl » Thu, 3. Nov 16, 23:43

I had no logfile running at the time what i was describing earlier, so i just captured a Titurel this time, but anything else i did the same as before.

I used cwir boarding and told them to capture it for Family Ryak and as expected it's the same outcome: no crew and marineofficer gone, while the captured Titurel is Neutral.

rebirth.log

I took a look into the logfile. There are a lot of weird sounderrors but other than that... what do i know :?

@facastefff Yes you need to install the "normal" autocrew mod aswell.

pref
Posts: 5589
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref » Fri, 4. Nov 16, 00:50

AutoCrew should only do anything if the ship owner is the player.
If its another faction then no crew is added.

I cannot find any errors related to boarding in your log nor can i see a successful boarding log entry.. are you sure any boarding occured while this log was created?
The log is rewritten at every game launch so i can only see anything if the boarding occured in the same game session.

Also you have lots of mod related errors - might be there is a conflict.
And for some reason your log starts with 8mb of nothing, looks pretty weird. Maybe a bug in the game or the first 99% of the log is lost for some reason.


Anyway try to board for yourself (not sure it'd make sense for AC to spawn NPCs for other factions), and if there are problems please upload the log from that session!

Babberdeggl
Posts: 77
Joined: Wed, 28. Apr 10, 00:05
x4

Post by Babberdeggl » Fri, 4. Nov 16, 02:43

Yes i'm sure. I started the game with log on. Then i did some stuff ingame and approximately 2 minutes before i started to give the boarding command i saved, alt tabbed out, deleted what was in the log so far, so you would not have so much to look at. Then i went back ingame, did the whole capture process, quit the game and uploaded the log.

Why it's 8mb, i don't know, maybe because i deleted the contend of the log, instead of the log file a couple of times.

Anyway, i'm totally fine and happy how autocrew is working right now. So thank you very much Pref for all your effort and your awesome mod. I wouldn't want to play X:R anymore without it.

pref
Posts: 5589
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref » Fri, 4. Nov 16, 14:40

Thanks!

So the neutral ship issue got solved? I'd hate to create bugs for CWIR.

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Fri, 4. Nov 16, 15:08

the "neutral" behavior is based on the standalone boarding mod and not an produced issue - the idea was to train the crew

in an upcomming release of CWIR this should be changed to a fully working option that generates a working faction ship

pref
Posts: 5589
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref » Fri, 4. Nov 16, 17:25

Cheers Marvin, then its not even a bug.
If i can help with the feature let me know!

User avatar
TheRealBix
Posts: 400
Joined: Thu, 2. Jul 09, 14:34
x4

Post by TheRealBix » Mon, 20. Feb 17, 02:22

Hello :)
Here is a patch to make it work with CWIR
http://tinyurl.com/z4wvt32

And thanks for your mod :)

kyrah
Posts: 59
Joined: Mon, 14. Mar 16, 16:41
x4

Post by kyrah » Fri, 12. May 17, 09:43

Do it work with CWIR 1.65?

I3laze
Posts: 78
Joined: Tue, 13. Oct 15, 11:52
x4

Post by I3laze » Mon, 15. May 17, 02:18

TheRealBix wrote:Hello :)
Here is a patch to make it work with CWIR
http://tinyurl.com/z4wvt32

And thanks for your mod :)
Sorry for being dumb but where do you put the patch? In the Autocrew folder or the CWIR folder?

cheers

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Mon, 15. May 17, 08:54

I3laze wrote:
TheRealBix wrote:Hello :)
Here is a patch to make it work with CWIR
http://tinyurl.com/z4wvt32

And thanks for your mod :)
Sorry for being dumb but where do you put the patch? In the Autocrew folder or the CWIR folder?

cheers
CWIR...

I3laze
Posts: 78
Joined: Tue, 13. Oct 15, 11:52
x4

Post by I3laze » Mon, 15. May 17, 17:12

alexalsp wrote:
I3laze wrote:
TheRealBix wrote:Hello :)
Here is a patch to make it work with CWIR
http://tinyurl.com/z4wvt32

And thanks for your mod :)
Sorry for being dumb but where do you put the patch? In the Autocrew folder or the CWIR folder?

cheers
CWIR...
Cheers :)

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp » Sun, 28. May 17, 02:59

Check for errors, who understands better than me ... :roll:


Not for CWIR

We get rid of the stupid captain. Button becomes active - BACK TO Skunk.

Taken from cwir.


NPC_Shiptrader.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?> 
<diff> 


	<replace sel="/mdscript[@name='NPC_Shiptrader']/cues/cue[@name='Base']/cues/cue[@name='BuildFinished']">
		<cue name="BuildFinished" instantiate="true">
			<conditions>
				<check_any>
					<event_build_finished object="$actor.container" />
					<event_cue_signalled />
				</check_any>
				<check_value value="$BuildModule? and $ship? and event.param == $BuildModule and event.param.dockslot.component.docked.indexof.{$ship}"/>
			</conditions>
			<actions>
				<debug_text text="'Build-finished conversation with architect started: %1, actor=%2, %3'.[event.param, event.object, event.object.name]" />
				<substitute_text text="this.$logtext" source="{1016,51}">
					<replace string="'$SHIP$'" with="$ship.name" />
					<replace string="'$SECTOR$'" with="$ship.sector.name" />
				</substitute_text>
				<write_to_logbook category="upkeep" text="this.$logtext" />

				<do_if value="not $upgrade? and not $component?"> 
					
					<find_dock_location name="$target_dock"  container="$ship" size="tag.dock_p" /> 
					
					<do_if value="$ship.isclass.[class.ship_xl, class.ship_l]"> 
					
						<create_platform_actor name="$commander" dockingbay="$target_dock.component" type="entitytype.commander"> 
							<owner exact="faction.player"/> 
							<skills> 
                               <skill type="boarding" min="5" max="5" />
                               <skill type="combat" min="5" max="5" />
                               <skill type="engineering" min="4" max="5" />
                               <skill type="leadership" min="5" max="5" />
                               <skill type="management" min="4" max="4" />
                               <skill type="morale" min="5" max="5" />
                               <skill type="navigation" min="5" max="5" />
                               <skill type="science" min="5" max="5" />
							</skills> 
						</create_platform_actor> 
					</do_if> 
					
					<do_else> 
						<create_platform_actor name="$commander" dockingbay="$target_dock.component" type="entitytype.pilot"> 
							<owner exact="faction.player"/> 
							<skills> 
                               <skill type="boarding" min="4" max="5" />
                               <skill type="combat" min="5" max="5" />
                               <skill type="engineering" min="4" max="5" />
                               <skill type="leadership" min="5" max="5" />
                               <skill type="management" min="4" max="4" />
                               <skill type="morale" min="5" max="5" />
                               <skill type="navigation" min="5" max="5" />
                               <skill type="science" min="5" max="5" />
							</skills> 
						</create_platform_actor> 
					</do_else> 
					<assign_control_entity object="$ship" actor="$commander"/> 
					<start_script object="$commander" name="'player.default'"/>
					
					<do_if value="$ship.isclass.[class.ship_xl, class.ship_l]"> 
					
						<!-- Engineer --> 
						<create_platform_actor name="$engineer" dockingbay="$target_dock.component" type="entitytype.engineer"> 
							<owner exact="faction.player"/> 
							<skills> 
								<skill type="combat" min="1" max="5"/> 
								<skill type="engineering" min="5" max="5"/> 
								<skill type="leadership" min="1" max="5"/> 
								<skill type="management" min="1" max="5"/> 
								<skill type="morale" min="1" max="5"/> 
								<skill type="navigation" min="1" max="5"/> 
								<skill type="science" min="1" max="5"/> 
							</skills> 
						</create_platform_actor> 
						<assign_engineer object="$ship" actor="$engineer" /> 
						<start_script object="$engineer" name="'engineer.ai'"/> 
						
						<!-- Defense argon.defence --> 
						<create_platform_actor name="$defence" dockingbay="$target_dock.component" type="entitytype.defencecontrol"> 
							<owner exact="faction.player"/> 
							<skills> 
								<skill type="combat" min="5" max="5"/> 
								<skill type="engineering" min="1" max="5"/> 
								<skill type="leadership" min="5" max="5"/> 
								<skill type="management" min="1" max="5"/> 
								<skill type="morale" min="5" max="5"/> 
								<skill type="navigation" min="5" max="5"/> 
								<skill type="science" min="1" max="5"/> 
							</skills> 
						</create_platform_actor> 
						<assign_defence_manager object="$ship" actor="$defence" /> 
						<start_script object="$defence" name="'fight.defend.capital'"/> 
					</do_if> 

              <do_if value="$ship.primarypurpose == objectpurpose.build and $ship.isclass.ship_xl">
                <!-- <create_platform_actor name="$NHArchi" type="entitytype.architect" dockingbay="$target_dock.component" group="familyryak.architect">  ref="architect_omicron_lyrae_random" -->
                <create_platform_actor name="$architect" type="entitytype.architect" dockingbay="$target_dock.component">
                  <owner exact="faction.player"/>
                  <skills>
                    <skill type="boarding" min="1" max="3" />
                    <skill type="combat" min="1" max="3" />
                    <skill type="engineering" min="5" max="5" />
                    <skill type="leadership" min="1" max="3" />
                    <skill type="management" min="5" max="5" />
                    <skill type="morale" min="1" max="3" />
                    <skill type="navigation" min="5" max="5" />
                    <skill type="science" min="1" max="3" />
                  </skills>
                </create_platform_actor>
                <assign_architect actor="$architect" object="$ship"/>
                <set_actor_account actor="$architect" />
              </do_if>
 					
					<remove_value name="$commander"/> 
					<remove_value name="$engineer"/> 
					<remove_value name="$shipdefence"/> 
					<remove_value name="$isbuildership"/> 
					<create_ai_unit object="$ship" /> 
					<do_if value="$droneplan"> 
						<do_all exact="$droneplan.count" counter="$i"> 
							<add_ammo object="$ship" macro="macro.{$droneplan.{$i}.{1}}" amount="$droneplan.{$i}.{2}" /> 
						</do_all> 
					</do_if> 
					<!-- give the ship some fuel so it can jump --> 
					<add_cargo ware="ware.fuelcells" object="$ship" exact="500" result="$fuel" /> 
					<do_if value="$fuel gt 0"> 
						<remove_cargo ware="ware.fuelcells" object="$actor.container" exact="$fuel" /> 
					</do_if> 
					<remove_value name="$fuel"/> 
<!-- 					<do_if value="$ship.commander != player.primaryship"> 
						<set_object_commander object="$ship" commander="player.primaryship" /> 
					</do_if>  -->
				</do_if> 

				<do_elseif value="not $upgrade? and not $component?">
					<!-- TODO: Make it a bad pilot -->
					<create_cue_actor cue="this" group="argon.pilot" />
					<find_dock_location name="$target_dock" container="$ship" size="tag.dock_p" />
					<add_actor_to_platform actor="this.actor" dockingbay="$target_dock.component" />
					<set_owner object="this.actor" faction="faction.player" />
					<do_if value="$ship.isclass.ship_l or $ship.isclass.ship_xl">
						<set_entity_type entity="this.actor" type="entitytype.commander" />
					</do_if>
					<do_else>
						<set_entity_type entity="this.actor" type="entitytype.pilot" />
					</do_else>
					<assign_pilot object="$ship" actor="this.actor" />
					<create_ai_unit object="$ship" />
					<do_if value="$droneplan">
						<do_all exact="$droneplan.count" counter="$i">
							<add_ammo object="$ship" macro="macro.{$droneplan.{$i}.{1}}" amount="$droneplan.{$i}.{2}" />
						</do_all>
					</do_if>
					<!-- give the ship some fuel so it can jump -->
					<add_cargo ware="ware.fuelcells" object="$ship" exact="500" result="$fuel" />
					<do_if value="$fuel gt 0">
						<remove_cargo ware="ware.fuelcells" object="$actor.container" exact="$fuel" />
					</do_if>
					<remove_value name="$fuel"/>
<!-- 					<do_if value="$ship.commander != player.primaryship">
						<set_object_commander object="$ship" commander="player.primaryship" />
					</do_if> -->
				</do_elseif>
				
				<remove_value name="$ship.pilot.$shiptrader_docking" /> 
				<do_if value="$ship.isplayerowned"> 
					<start_script object="$ship.pilot" name="'player.default'"/> 
				</do_if> 
				<do_else> 
					<set_value name="$soldship2" exact="$ship" /> 
					<include_actions ref="SellShipActions_Jobs" /> 
					<remove_value name="$soldship2" /> 
				</do_else> 
				
				<clear_buildmodule buildmodule="$BuildModule" />
				<reset_cue cue="ListenOnShipDestroyed" />
				<do_if value="FixBrokenSetupFromCVs_SignalBuildStarted.isinstance">
					<cancel_cue cue="FixBrokenSetupFromCVs_SignalBuildStarted" />
				</do_if>
				<remove_value name="$buildcost" />
				<remove_cue_actor cue="this" />
				<remove_value name="$upgrade" />
				<remove_value name="$droneplan" />
				<remove_value name="$ammoplan" />
				<remove_value name="$component" />
				<remove_value name="$target_dock"/> 
				<remove_value name="$PlayerHaveShipyards" />
			</actions>
			<cues>
				<cue name="BuiltShipLeft">
					<conditions>
						<check_any>
							<event_object_undocked object="$ship"/>
							<event_object_destroyed object="$ship"/>
						</check_any>
					</conditions>
					<actions>
						<do_if value="event.name == 'event_object_undocked'">
							<start_conversation actor="$actor" conversation="Speak" type="normal" convparam="1115" />
						</do_if>
						<remove_value name="$ship" />
						<remove_value name="$actor.$shiptrader_isbusy" />
					</actions>
				</cue>
			</cues>
		</cue>

	</replace>



</diff>              


Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Wed, 17. Jan 18, 01:19

Which line in the MD file do you change that makes it so that the captains that are assigned automagically to ships either they be bought from a shipyard or are capped will use the actually captain model and not the pilot model?

Ferolin
Posts: 1
Joined: Tue, 15. May 18, 22:12

Post by Ferolin » Wed, 30. May 18, 02:30

My favorite mod ,and just faund out it is not working with "The New Frontier" mod .Thanks for mod tough I enjoyed it alot in vanila.

Thufar
Posts: 407
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Thufar » Sun, 23. Sep 18, 01:30

Yeah, noticed it doesn't work for NF this morning. Here's hoping TheRealBix comes through again for this.

Regards,
Thu

<edit spelling>

Post Reply

Return to “X Rebirth - Scripts and Modding”