Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [Race Mod] Need more Info

  1. #1
    Junior Member
    Join Date
    Jun 2015
    Posts
    28

    [Race Mod] Need more Info

    Hello,

    With all the codes i've seen so far, and all the tries I did, imho it's easy to create a simple Race with the current state of the game.

    Expected Gameplay :
    You have to go through, let's say ... 10, checkpoints (TS3OBT_BASIC) (the thing you shoot at in tutorial 6). That's all for now

    What I can do :
    Spawn the FireArc, spawn 2 (or more) checkponts.

    What I CAN NOT do :
    1) Spawn a checkpoint at a precise location relative to player (diffX, diffY, diffZ would be cool)
    2) Detect when the player goes through the checkpoint

    What I know :
    • StartLoc= {Radius = 100.0 ...} => Doesn't put the object 100 meters nor kilometers from user
    • T2_FireArc_MANEUVERING has this event (I tried many things but I can't get the detection to work):
      Code:
      Event79 = {
      		Line = "Continue to use fore and aft thrust until you are stable at about 0.3 kilometers from the Campana.",
      		Delay = 300, message_LENGTH = 1, object_ID = -1,
      		System = "PLAYER_", SystemID = 0, Setting = 1, 
      		compSystem = "CSM_center", compSystemID = 3, compSetting = 300, shipTYPE = "COCKPIT",
      	},


    Any help from fellow modders would be appreciated

    Current code (in case you'll see any errors) :

    Code:
    T8_FireArc_RACE = {}
    T8_FireArc_RACE_TUTscript = {}
    
    --*************************************
    --*************************************
    T8_FireArc_RACE = {
    	UIName							= "Race V0.1",
    	UIDesc							= "gogogo !",
    	UIBriefing						= "gogogo !",
    	has_TUTORIAL					= 1,
    
    	MissionTrigger					= {Type = "ASAP", Action = "NONE", Subject = "NONE", sName = "NONE"},
    	tRegion							= {Radius = 0.0, Subject = "PLAYER", sName = "NONE"},
    	StartDelay						= 0,
    
    	MissionLoc						= {Radius = 500.0, Subject = "PLAYER", sName = "NONE"},
    
    	FlightTotal = 3,
    	Flight1 = {
    		UIName						= "Trainer",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 160, DetailC = 0},
    		StartLoc					= {Radius = 20.0, Subject = "PLAYER", DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 1,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},																				-- Pri & Sec tail number identifier	XX-xxxx
    		genNewShips					= 1,
    		preDefSHIP					= "FireArc_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE", DetailA = 2, DetailB = 3, DetailC = 2},		--where(A), host(B), mine(C)
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    	Flight2 = {
    		UIName						= "Checkpoint 1",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 100.0, Subject = "PLAYER",  DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},																				-- Pri & Sec tail number identifier	XX-xxxx
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 1000},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    	Flight3 = {
    		UIName						= "Checkpoint 2",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 200.0, Subject = "PLAYER",  DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},																				-- Pri & Sec tail number identifier	XX-xxxx
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 1000},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    }
    
    T8_FireArc_RACE_TUTscript = {
    	Event1 = {
    		Line = "Go to your first checkpoint !",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CSM_center", compSystemID = 3, compSetting = 15, shipTYPE = "BOMBER",
    	},
    	Event2 = {
    		Line = "FIRST CHECKPOINT",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    }
    
    --*************************************
    
    --OTHER NOTES:
    ----Flights with capital ships (anything that can launch another ship) can only have 1 ship per flight
    ----The first task must ALWAYS be an arrival task (Type = 4)
    ----Manually assigned tail numbers, for missions, are in the range of primary 80 - 99, UNLESS using a pre-existing ship (if the tail number is not found, then a new ship created with a random tail number)
    ----flights with either primary/secondary of -1, or ranges outside of primary 80 - 99, will be randomly assigned
    ----the ship name (sName) is used to link a flight to their mothership. MAKE SURE THE NAMES ARE IDENTICAL!

  2. #2
    Member
    Join Date
    Jun 2015
    Location
    Delaware, USA
    Posts
    44
    Hey nice start, I would have a look around the Tutorial script in the external docking to find the script that happens when the ship is close to the dock and then set that to 0 distance. Bit busy this week but I'll help you look as soon as possible. Also if possible, have a second Event that happens after the time limit for the race so they know if they made it or not.
    || Oxfords, not Brogues. || - Modder Extraordinaire (or so I believe) - SANDBOX MOD - GIZOOGLE TALK - QUOTES+ - ||

  3. #3
    Administrator
    Join Date
    Oct 2010
    Location
    Texas
    Posts
    2,119
    I actually wanted to do something like this. It will require a bit of support on my end, but I think I can get you hooked up with what you need for the first update...
    __________________
    "There is no spoon..."

  4. #4
    Junior Member
    Join Date
    Jun 2015
    Posts
    28
    Obviously you don't have to reply if you don't have the time Michael

    I won't bother you until you get us some documentation (about Flights, Tasks, Events), and I do understand that this is not the priority at all.

    That being said, I have a problem with the tutorial finishing too early.

    When I enter the cockpit, RS says that the tutorial is over and I can exit or continue.

    I've read the beggining events of differents tuts and wrote something that SHOULD work.

    But it isn't ! And I don't understand why :/

    I will continue to try other things.

    Last version :

    Code:
    T8_FireArc_RACE = {}
    T8_FireArc_RACE_TUTscript = {}
    
    -- **************************************************************************
    --											INIT MISSION
    -- **************************************************************************
    
    T8_FireArc_RACE = {
    	UIName							= "Race v0.1",
    	UIDesc							= "Flight through 10 checkpoints as fast as possible.",
    	UIBriefing						= "Flight through 10 checkpoints as fast as possible.",
    	has_TUTORIAL					= 1, -- Not sure this is working
    
    	MissionTrigger					= {Type = "ASAP", Action = "NONE", Subject = "NONE", sName = "NONE"},
    	tRegion							= {Radius = 0.0, Subject = "PLAYER", sName = "NONE"},
    	StartDelay						= 0,
    
    	MissionLoc						= {Radius = 500.0, Subject = "PLAYER", sName = "NONE"},
    
    	FlightTotal = 3,
    	
    	-- ****************************** FRIREARC
    	Flight1 = {
    		UIName						= "Trainer",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 160, DetailC = 0},
    		StartLoc					= {Radius = 20.0, Subject = "PLAYER", DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 1,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "FireArc_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE", DetailA = 2, DetailB = 3, DetailC = 2},		--where(A), host(B), mine(C)
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 1
    	Flight2 = {
    		UIName						= "Checkpoint 1",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 100.0, Subject = "PLAYER",  DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 1000},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 2
    	Flight3 = {
    		UIName						= "Checkpoint 2",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 200.0, Subject = "PLAYER",  DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 1000},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    }
    
    -- **************************************************************************
    --						INIT MISSIONS EVENTS (TUTORIAL???)
    -- **************************************************************************
    
    T8_FireArc_RACE_TUTscript = {
    	Event1 = {
    		Line = "Please go to your seat to start the race.",
    		Delay = 300, message_LENGTH = 1, object_ID = 7,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "HATCH_", compSystemID = 1, compSetting = 1, shipTYPE = "BOMBER",
    	},
    	Event2 = {
    		Line = "You have 30 seconds to get to your seat !",
    		Delay = 100, message_LENGTH = 30000, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "BOMBER",
    	},
    	Event3 = {
    		Line = "The race starts 5 seconds after you've enabled power to HMD.",
    		Delay = 30000, message_LENGTH = 1, object_ID = 125,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "SEAT_", compSystemID = 1, compSetting = 3, shipTYPE = "COCKPIT",
    	},
    	Event4 = {
    		Line = "Get ready !",
    		Delay = 50, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CANMON_", compSystemID = 0, compSetting = 1, shipTYPE = "COCKPIT",
    	},
    	Event5 = {
    		Line = "...5...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event6 = {
    		Line = "...4...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event7 = {
    		Line = "...3...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event8 = {
    		Line = "...2...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event9 = {
    		Line = " >(^.^)> ! ...GO ... ! <(^.^)<",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	--Event1 = {
    	--	Line = "Go to your first checkpoint !",
    	--	Delay = 300, message_LENGTH = 1, object_ID = -1,
    	--	System = "PLAYER_", SystemID = 0, Setting = 1, 
    	--	compSystem = "CSM_center", compSystemID = 3, compSetting = 15, shipTYPE = "BOMBER",
    	--},
    	--Event2 = {
    	--	Line = "FIRST CHECKPOINT",
    	--	Delay = 300, message_LENGTH = 1, object_ID = -1,
    	--	System = "NONE", SystemID = -1, Setting = -1, 
    	--	compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	--},
    }
    
    --*************************************
    
    --DEV NOTES:
    ----Flights with capital ships (anything that can launch another ship) can only have 1 ship per flight
    ----The first task must ALWAYS be an arrival task (Type = 4)
    ----Manually assigned tail numbers, for missions, are in the range of primary 80 - 99, UNLESS using a pre-existing ship (if the tail number is not found, then a new ship created with a random tail number)
    ----flights with either primary/secondary of -1, or ranges outside of primary 80 - 99, will be randomly assigned
    ----the ship name (sName) is used to link a flight to their mothership. MAKE SURE THE NAMES ARE IDENTICAL!
    
    --*************************************
    
    -- NOTES:
    -- --MISSION TRIGGER				conditions required to start the mission
    -- ----TYPE:							ASAP, EVENT, REGION
    -- ------									[ASAP: mission starts immediately. Normally for single missions]
    -- ------									[EVENT: some event triggers the mission to begin]
    -- ------									[REGION: a ship enters a region of space]
    -- ----ACTION:							The action that triggers the start TYPE (if EVENT or REGION)
    -- ------									[FOR EVENT: ARRIVES, DEPARTS, DESTROYED, ATTACKED, UNDOCKS, DOCKS, INFLIGHT]
    -- ------									[FOR REGION: ENTERS, EXITS]
    -- ----SUBJECT							(PLAYER_HOST, FRIENDLY, ENEMY, CIVILIAN, FACTION, SHIP, PILOT)
    -- ----SUBJECT NAME(sNAME)				(name of ship, pilot, faction)
    
    -- --TRIGGER REGION DATA
    -- ----RADIUS							(triggering radius around region subject in km)
    -- ----SUBJECT							(PLAYER, FRIENDLY, ENEMY, CIVILIAN, SHIP, PILOT)
    -- ----sNAME							(name of ship, pilot, faction)
    -- --STARTDELAY:						time in milli-seconds after the mission is triggered before it actually begins
    
    -- --START LOC						where a flight departs from to enter the mission area
    -- ----TYPE:							(PLAYER, MOTHERSHIP, CURRENT, ORBIT, ETC)
    -- ------									[MOTHERSHIP then flight will only spawn from a mothership. Give mothership details in]
    -- ------									[if PLAYER starts in space using at range from mission location, using detailA for: inORBIT(1), etc., etc.,]
    -- ------									[if ORBIT then use details A, B and C for system, planet and moon ID's if know, else use -1's and use name only]
    -- ------									[if CURRENT (as in location) then us details A, B and C for x, y and z position (in meters)]
    -- ----sNAME:							(name of region target)
    -- ----radius:							if ORBIT then this is the altitude above the body in km
    -- --END LOC						where a flight flies to end their part in the mission
    -- ----END REGION OBJECT				(MOTHERSHIP, CURRENT[location], SYSTEM, PLANET, MOON, SUN, ETC)	
    -- ----END REGION NAME					(name of region target)
    -- --FLIGHT STARTSTATE:				
    -- ----Type:						ALL Systems Up(1), SystemActivated(2), SystemDisabled(4) OR System Destroyed(8), React Tank Empty(16), Coolant Tank Empty(32), LSS tank EMPTY(64) 
    -- ----DetailA:						CSM(1), BATT(2), FCM(4), REACT(8), TMS(16), MTS(32), LENR(64), FLUX(128), <--used with types 2, 4 and 8
    -- ----DetailB:						LSS(1), ECS(2), COMM(4), NAS(8), notSECURED(16) <--used with types 2, 4 and 8
    -- ----DetailC:						when detailA or B is set to a mult-unit system (such as MES), then this denotes WHICH unit in the system is affected (16 = ALL)						
    -- --FLIGHT TASK:
    -- ----Action:						ARRIVE, DEPART, ATTACK, NAVIGATE, ESCORT, TRAIL, ENTERORBIT, MAINTAINORBIT, DEFENDAREA, DEPLOY, COMBATCOMMAND
    -- ----Method:						MAGIC, MOTHERSHIP, FLUXDRIVE, DARKDRIVE, MTSBURN, PRIWPN, SECWPN, TERWPN, ANYWPNS
    -- ----Trigger:						ASAP, SHIPARRIVES, SHIPDEPARTS, FLIGHTARRIVES, FLIGHTDEPARTS, SHIPDESTROYED, FLIGHTDESTORYED,
    -- ----									SHIPDISABLED, SHIPATTACKED, SHIPDAMAGED, ASAP
    -- ----Delay:						in m/s, delay time before starting task
    -- ----Time Limit:					in m/s, time allowed to complete task. 0 for unlimited
    -- --FLIGHT TASK TARGET PRI & SEC:
    -- ----Type:						SHIP, CELESTIAL, SATELLITE, MINE, NONE
    -- ----tDetail:						STATION, FIGHTER, BOMBER, FREIGHTER, ETC, STAR, PLANET, MOON, ANYSHIP, ATTACKCRAFT (any small fighter/bomber/freighter), ESCORTSHIP, CAPITALSHIP
    -- ----								if ARRIVE via MOTHERSHIP A=host bay/port; B = docked port; C=Internal Pad(0), External Pad(1), External Collar(2)
    -- ----tNum_PRI, SEC & TER:			ship Tail number, system/planet/moon ID, -1 if unknown (assign random)
    -- ----GenNewShips:					if a ship with the requested tail number is not found can a new one be created to fill its place? 0(NO), 1(YES)
    -- ----tName:						Name of object if ID's are unknown
    -- --TargetIFF:
    -- ----Type:						Faction, Character, ENEMY, FRIENDLY, CIVILIAN, ANY
    -- ----tDetail:						Faction Type
    -- ----tName:						Character Name if character, or Faction Name if a generalized faction is used (such as "ColonyGov")
    -- --SPAWN TOTAL:					number of times flight is spawned
    -- --PLAYER ALLOWED:				can the player fly a ship in this flight (is an interior available)
    -- --PLAYER SHIP ALLOWED:			can the player use one of their owned ships in this flight
    -- --SHIP TOTAL:					number of ships in this flight
    -- --UI NAME:						Name of ship or RANDOM. For flights of more than one it becomes "name" 1, 2, 3, etc
    -- --preDefSHIP:					pre-defined ship name (from Mod/Ships/PreDefined folder) or RANDOM (not yet implemented)
    -- --PILOT NAME:					Name of pilot, ROSTER or RANDOM. For multi-crewed ships this is the captain's name
    
    -- END NOTES

  5. #5
    Junior Member
    Join Date
    Jun 2015
    Posts
    28

    Talking [Race Mod v0.2]

    After A LOT of try and crash and retry.

    I finally have a nice base code for the race \o/

    The race start once you powered your VMS. Then you proceed to go through 5 (for now) checkpoints.
    The funny thing is that you dont know checkpoints number. But I had some fun with it, going to random checkpoints.

    I have 3 problems :
    - How to show checkpoints name ? (or how to lock a checkpoint using sensors with script)
    - How to precisely place a checkpoint
    - How can I have a timer (as far as I know, this is NIY)

    For those who want to try it out you have to create a file "T8_FireArc_RACE.ROG" in your "RogSys\Rogue_System\Mod\RogSysCM\Campaigns\Single Missions" folder.

    Then chose the "Race v0.2" Mission, with Tutorial enabled.

    Code:
    T8_FireArc_RACE = {}
    T8_FireArc_RACE_TUTscript = {}
    
    -- **************************************************************************
    --											INIT MISSION
    -- **************************************************************************
    
    T8_FireArc_RACE = {
    	UIName							= "Race v0.2",
    	UIDesc							= "Flight through 5 checkpoints as fast as possible.",
    	UIBriefing						= "Flight through 5 checkpoints as fast as possible.",
    	has_TUTORIAL					= 1,
    
    	MissionTrigger					= {Type = "ASAP", Action = "NONE", Subject = "NONE", sName = "NONE"},
    	tRegion							= {Radius = 0.0, Subject = "PLAYER", sName = "NONE"},
    	StartDelay						= 0,
    
    	MissionLoc						= {Radius = 500.0, Subject = "PLAYER", sName = "NONE"},
    
    	FlightTotal = 6,
    	
    	-- ****************************** FRIREARC
    	Flight1 = {
    		UIName						= "Trainer",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 160, DetailC = 0},
    		
    		StartLoc					= {Radius = 20.0, Subject = "PLAYER", DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 1,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "FireArc_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 2,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE", DetailA = 2, DetailB = 3, DetailC = 2},		--where(A), host(B), mine(C)
    			TargetIFF				= {Type = "NONE"},
    		},
    		Task2 = {
    			TimeLimit				= -1,
    			Task					= {Action = "NAVIGATE", Method = "NONE", Trigger = "ASAP", sName = "NONE", Delay = 0},
    			TargetPRI				= {Type = "SHIP", Subject = "ATTACKSHIP", DetailA = -1, DetailB = -1, DetailC = -1, sName = "NONE"},
    			TargetIFF				= {Type = "Faction", Subject = "ColonyGov", sName = "Dunna Honrad"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 1
    	Flight2 = {
    		UIName						= "Checkpoint 1",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 200.0, Subject = "PLAYER",  DetailA = 1, DetailB = -1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 1,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 2
    	Flight3 = {
    		UIName						= "Checkpoint 2",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 400.0, Subject = "PLAYER",  DetailA = 1, DetailB = 1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 1,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 3
    	Flight4 = {
    		UIName						= "Checkpoint 3",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 600.0, Subject = "PLAYER",  DetailA = 1, DetailB = 1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 1,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 4
    	Flight5 = {
    		UIName						= "Checkpoint 4",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 800.0, Subject = "PLAYER",  DetailA = 1, DetailB = 1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 1,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    	},
    	
    	-- ****************************** CHECKPOINT 5
    	Flight6 = {
    		UIName						= "Checkpoint 5",
    		Owner						= {Type = "Faction", Subject = "FactionA", sName = "NONE"},
    		StartState					= {Types = 1, DetailA = 0, DetailB = 0, DetailC = 0},
    		StartLoc					= {Radius = 1000.0, Subject = "PLAYER",  DetailA = 1, DetailB = 1, DetailC = -1, sName = "NONE"},
    		SpawnTotal					= 1,
    		playerALLOWED				= 0,
    		playerShipALLOWED			= 0,
    		ShipTotal					= 1,
    		tailNUMBER1					= {Pri = -1, Sec = -1},
    		genNewShips					= 1,
    		preDefSHIP					= "TS3OBT_BASIC",
    		PilotName					= "RANDOM",
    		TaskTotal					= 1,
    		Task1 = {
    			Task					= {Action = "ARRIVE", Method = "MAGIC", Trigger = "NONE", sName = "NONE", Delay = 0},
    			TimeLimit				= -1,
    			TargetPRI				= {Type = "NONE"},
    			TargetIFF				= {Type = "NONE"},
    		},
    	},
    }
    
    -- **************************************************************************
    --						INIT MISSIONS EVENTS (TUTORIAL???)
    -- **************************************************************************
    
    T8_FireArc_RACE_TUTscript = {
    	Event1 = {
    		Line = "Welcome pilot ! Hope you are ready for the race !",
    		Delay = 1000, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "BOMBER",
    	},
    	Event2 = {
    		Line = "Make your way to the cockpit to begin the race.",
    		Delay = 300, message_LENGTH = 1, object_ID = 7,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "HATCH_", compSystemID = 1, compSetting = 1, shipTYPE = "BOMBER",
    	},
    	Event3 = {
    		Line = "Remember to engage the auto-pilot if you need. Use sensors to lock checkpoints. ",
    		Delay = 1, message_LENGTH = 1000, object_ID = -1,
    		System = "HATCH_", SystemID = 1, Setting = 1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 3, shipTYPE = "BOMBER",
    	},
    	Event4 = {
    		Line = "The race will start once you engaged once you enable power to VMS (those curved screens).",
    		Delay = 1000, message_LENGTH = 1, object_ID = 10,
    		System = "SEAT_", SystemID = 1, Setting = 3, 
    		compSystem = "SEAT_", compSystemID = 1, compSetting = 2, shipTYPE = "COCKPIT",
    	},
    	Event5 = {
    		Line = "Get in your seat first ! Then get your systems ready, and power VMS last.",
    		Delay = 1000, message_LENGTH = 1, object_ID = 125,
    		System = "NONE", SystemID = -1, Setting = 0, 
    		compSystem = "SEAT_", compSystemID = 1, compSetting = 3, shipTYPE = "COCKPIT",
    	},
    	Event6 = {
    		Line = "Get ready !",
    		Delay = 500, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CANMON_", compSystemID = 0, compSetting = 1, shipTYPE = "COCKPIT",
    	},
    	Event7 = {
    		Line = "...5...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event8 = {
    		Line = "...4...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event9 = {
    		Line = "...3...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event10 = {
    		Line = "...2...",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event11 = {
    		Line = " >(^.^)> ! ...GO ... ! <(^.^)<",
    		Delay = 1000, message_LENGTH = 1000, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "NONE", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event12 = {
    		Line = "Go to checkpoint 1",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CSM_center", compSystemID = 3, compSetting = 20, shipTYPE = "COCKPIT",
    	},
    	Event13 = {
    		Line = "FIRST CHECKPOINT",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event14 = {
    		Line = "Go to checkpoint 2",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CSM_center", compSystemID = 4, compSetting = 20, shipTYPE = "COCKPIT",
    	},
    	Event15 = {
    		Line = "SECOND CHECKPOINT",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event16 = {
    		Line = "Go to checkpoint 3",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CSM_center", compSystemID = 5, compSetting = 20, shipTYPE = "COCKPIT",
    	},
    	Event17 = {
    		Line = "THIRD CHECKPOINT",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event18 = {
    		Line = "Go to checkpoint 4",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CSM_center", compSystemID = 6, compSetting = 20, shipTYPE = "COCKPIT",
    	},
    	Event19 = {
    		Line = "FOURTH CHECKPOINT",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event20 = {
    		Line = "Go to checkpoint 5",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "PLAYER_", SystemID = 0, Setting = 1, 
    		compSystem = "CSM_center", compSystemID = 7, compSetting = 20, shipTYPE = "COCKPIT",
    	},
    	Event21 = {
    		Line = "FIFTH CHECKPOINT",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    	Event22 = {
    		Line = "CONGRATULATIONS ! ",
    		Delay = 300, message_LENGTH = 1, object_ID = -1,
    		System = "NONE", SystemID = -1, Setting = -1, 
    		compSystem = "PLAYER_", compSystemID = -1, compSetting = 0, shipTYPE = "COCKPIT",
    	},
    }

  6. #6
    Junior Member
    Join Date
    Jun 2015
    Posts
    28
    I was working on the race mod again and made this :

    Attachment 20002

    "This isn't even my final form !"

  7. #7
    Administrator
    Join Date
    Oct 2010
    Location
    Texas
    Posts
    2,119
    Love it Should post that over in Steam/Screenshots
    __________________
    "There is no spoon..."

  8. #8
    Junior Member
    Join Date
    Jun 2015
    Posts
    28
    I'll try to create a BIG station tomorrow

    I've already tried with docking many SV46 II and all went well.

    Btw, I was surprised that it was detected as a single station and responded properly. I could undock and when I was aiming at this "thing", only one square selector (like a missile lock) was appearing. I concluded that docked objects are not visible because their "mothership" is taking over.

  9. #9
    Administrator
    Join Date
    Oct 2010
    Location
    Texas
    Posts
    2,119
    Exactly. When multiple ships are docked, the primary one is treated as a "mothership"...
    __________________
    "There is no spoon..."

  10. #10
    Senior Member
    Join Date
    Jun 2015
    Posts
    131
    By the way Michael, I think it's important that users can use the Steam workshop to use, share, and update their mods. Of course, not necessarily now, but it's something to keep in mind

Similar Threads

  1. Cockpit info Display
    By Angus94 in forum rFactor 1 Modding
    Replies: 5
    Last Post: 05-07-2014, 10:48 AM
  2. Plugin info?
    By DimebagDK in forum rFactor 1 General Discussion
    Replies: 18
    Last Post: 01-30-2013, 11:53 AM
  3. FFB without under-oversterring info
    By olandese volante in forum rFactor 1 General Discussion
    Replies: 18
    Last Post: 12-09-2012, 05:38 PM
  4. SimRigs.com League Info
    By zild1221 in forum rFactor 1 Online Racing Discussion
    Replies: 0
    Last Post: 09-30-2011, 10:44 AM
  5. Using .tir info of tyres in Rfactor
    By adrian32 in forum Modding - Cars
    Replies: 3
    Last Post: 04-28-2011, 06:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •