[RELEASE] Resistance Commander

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: [RELEASE] Resistance Commander

Post by Ramirez »

That's a fair point. With all the testing I've been doing I've got used to switching through the commands quickly to find the Engage button! In fact the order that the buttons appear on the panel can be customised fairly easily. If you're feeling technical, open up the GWcontrolbutton.js script and go to the end where you should find this bit:

Code: Select all

this.setCommandPanel = function()
{   player.ship.awardEquipment("EQ_MISSILE_REMOVAL")
    player.ship.awardEquipment("EQ_UNDO_MINE")
    player.ship.awardEquipment("EQ_UNDO_MINE")
    player.ship.awardEquipment("EQ_SWEEP_MINE")
    player.ship.awardEquipment("EQ_HOLD_MINE")
    player.ship.awardEquipment("EQ_REGROUP_MINE")
    player.ship.awardEquipment("EQ_ENGAGE_MINE")}
You can rearrange the commands so if you'd like the Engage to be first on the left, replace this with:

Code: Select all

this.setCommandPanel = function()
{   player.ship.awardEquipment("EQ_MISSILE_REMOVAL")
    player.ship.awardEquipment("EQ_ENGAGE_MINE")
    player.ship.awardEquipment("EQ_ENGAGE_MINE")
    player.ship.awardEquipment("EQ_SWEEP_MINE")
    player.ship.awardEquipment("EQ_HOLD_MINE")
    player.ship.awardEquipment("EQ_REGROUP_MINE")
    player.ship.awardEquipment("EQ_UNDO_MINE")}
Using your squadron to attack innocent traffic doesn't affect your criminal rating unless you get involved yourself. If the police turn up in large numbers though you may have quite a fight on your hands, and losing even one of your units can have a big impact on morale.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

Coooooool, thanks.

would the minions get a legal record, and therefore bring undue attention from the Gals in Copper?
Image
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

Not really understanding code, would you mind supplying me with the text to put 'select all units' in the No. 1 spot, before 'select 1', and is 'undo' really necessary? maybe you have plans for it with your special functions WIP, but maybe it'd be better to allow the coms system to work with fewer missile pylons, for the native ships.

The operatives are a bit dim when it comes to flying around the main station. more than once I've launched only to have one or two of them fly straight into it. Also, I hate to fluff the 1st mission, but I cant find the 'enemy solar research lab in Arriti'
I did however find an 'unusual package' at the wichpoint. was that the remains of the lab? or is that un-connected?
I searched all round the sun & all, what with it being a 'solar' research thing, to no avail.
also, where do I change their names? i'd find it easier to assign personalities if they had names that I could pronounce :wink:
Image
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

Hiya.
I popped into a FTZ store, but when I came out there was none of the resistance ships, although they were still 'active'.
would they have been re spawned by the main station?
also, to answer my question above, can I edit the names here instead of 'randomname' somehow?

this.reset_GW_unit1 = function()
{missionVariables.GW_unit1_name = randomName().charAt(0)+". "+randomName()
missionVariables.GW_unit1_race = randomInhabitantsDescription(false)
missionVariables.GW_unit1_kills = 0
missionVariables.GW_unit1_missions = 0
missionVariables.GW_unit1_status = "Active"
missionVariables.GW_unit1_rank_no = 1
missionVariables.GW_unit1_rank = expandDescription("[GW_unit_rank_"+missionVariables.GW_unit1_rank_no+"]")
missionVariables.GW_unit1_history = clock.days + " - enlisted into "+ missionVariables.GW_player_squadron}

cheers.
enjoying a lot!
Image
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: [RELEASE] Resistance Commander

Post by Ramirez »

Hi Yodebee. To change the order of the unit selection, you'll need to find both this.setUnitPanel, which is in both GWcontrolbutton.js and GWmain.js, and also this.initialisePanel which is only in GWmain.js.

The kind of text you want in both would be:

Code: Select all

this.setUnitPanel = function()
{   player.ship.awardEquipment("EQ_MISSILE_REMOVAL")
    player.ship.awardEquipment("EQ_UNIT_ALL_MINE")
    player.ship.awardEquipment("EQ_UNIT_ALL_MINE")
    player.ship.awardEquipment("EQ_UNIT_1_MINE")
    player.ship.awardEquipment("EQ_UNIT_2_MINE")
    player.ship.awardEquipment("EQ_UNIT_3_MINE")
    player.ship.awardEquipment("EQ_UNIT_4_MINE")
    missionVariables.unitSelection = null
}
For some reason the first mine to be added always needs to be repeated in the script otherwise it doesn't appear properly.

The 'undo' function in the command panel is just there to return quickly to the unit selection panel without giving an order. Without it, the only way to get back to the selection panel is to reboot the squadron command system using shift+N (plus I liked the way it gave the panel a bit of symmetry). The requirement for 6 pylons comes from the need for 5 slots on the unit selection panel. Again, for some reason unknown to be it doesn't seem to work with just 5 free pylons.

Re the non-appearance of the solar laboratory, sorry, there's a typo in the GWmain script, where it references 'GW-SLAPU' it should in fact be 'GW-slapu'.

I don't know why units seem to have trouble around main stations. I haven't identified a cause so all I can suggest is to avoid giving them any complex commands until you're a safe distance away.

Re the FTZ store, when you dock while a mission's still running, any active units will be removed temporarily and should be respawned near your position (within 10km or so) when you next launch. There may have been a glitch in which the removal didn't take place properly and this would affect their reappearance.

The unit names and associated info generated by the script are stored in your save game; the script function you identified only runs when a unit is reset after it's lost in action. So, to edit the names to something more memorable the easiest way is to simply open up your savegame in a text editor and find the entries such as

Code: Select all

<key>mission_GW_unit1_name</key>
		<string>E. A’innuis</string>
and then modify the text within the strings. This will be called by all the various mission screens.

I'm doing some more work on this OXP (writing an interesting endgame) so while I'm at it I'll make some quick fixes for some of these issues.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

A little gremlin - Sorry :(
If you dock while your comms channel is open, then your arsenal of missiles gets mysteriously confiscated :?
Image
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: [RELEASE] Resistance Commander

Post by Ramirez »

That's annoying. I forgot to add in the function to give back the missiles when you dock. However, I've just tried adding it in and I have a problem, so I'm going to give a shout-out to the group for help.

The script I have for handling the command system is as follows:

Code: Select all

this.activated = function()

{	if(missionVariables.GW_mission != "NONE_SET")
	    {	if(player.ship.GWcontrolpanel == true)
				{player.ship.GWcontrolpanel = false
				player.ship.awardEquipment("EQ_MISSILE_REMOVAL")
				player.commsMessage("Comms channel closed")
				for(restoreCounter = 0;restoreCounter<this.storeMissileArray.length;restoreCounter++)
				{player.ship.awardEquipment(this.storeMissileArray[restoreCounter].equipmentKey);}
				}
		
			else
		
			{player.ship.GWcontrolpanel = true
			this.storeMissileArray = player.ship.missiles;
			this.initialisePanel()
			player.commsMessage("Comms channel opened")}
	    }
	else
	player.consoleMessage("Negative, squadron not active")
}
this.shipDockedWithStation = function()

{		if(player.ship.GWcontrolpanel == true)
		{player.ship.GWcontrolpanel = false
		player.ship.awardEquipment("EQ_MISSILE_REMOVAL")
		player.commsMessage("Comms channel closed")
		log(this.storeMissileArray)
		for(restoreCounter = 0;restoreCounter<this.storeMissileArray.length;restoreCounter++)
		{player.ship.awardEquipment(this.storeMissileArray[restoreCounter].equipmentKey);}
		}
	this.removeActiveUnits()
}
So the stuff under this.activated deals with the player switching the system on and off, and that all works fine. If the player docks while the system's still on, I want to use the same functions to close the comms and restore their missiles. Trouble is, when I go through the docking procedure I get an error saying that this.storeMissileArray isn't defined. I tried using the shipWillDock event handler instead but I get the same error.

Any ideas?
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

far beyond me, but can you get it to turn off automatically before docking?
Image
User avatar
Okti
---- E L I T E ----
---- E L I T E ----
Posts: 700
Joined: Sun Sep 26, 2010 1:51 pm
Location: A GH shop, near witchpoint to Oresrati in Galaxy 8

Re: [RELEASE] Resistance Commander

Post by Okti »

Moving the function and variables to a world script and calling that function from activated event may work. That is one of the problems I came across couple of times and that was my solution to it. Hope it helps. Defining the script for the equipment as a world script may also solve the problem.
My OXP's
And Latest Mission Coyote's Run
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

Ramirez wrote:
For some reason the first mine to be added always needs to be repeated in the script otherwise it doesn't appear properly.
For some reason, it doesn't need to be repeated for the 'all units' 'mine'. That produced a 2nd, non functioning [all units] mine.

This seems to work though.
this.setUnitPanel = function()
{ player.ship.awardEquipment("EQ_MISSILE_REMOVAL")
player.ship.awardEquipment("EQ_UNIT_ALL_MINE")
player.ship.awardEquipment("EQ_UNIT_1_MINE")
player.ship.awardEquipment("EQ_UNIT_2_MINE")
player.ship.awardEquipment("EQ_UNIT_3_MINE")
player.ship.awardEquipment("EQ_UNIT_4_MINE")
missionVariables.unitSelection = null
}


Doh. that didn't work. the fired 'unit all mine's disappear from the missile pylons :(
This is where I pile in & completely mess it all up ! haha
Image
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: [RELEASE] Resistance Commander

Post by Ramirez »

It seems you don't need the duplicate entry in the this.initialisePanel function, but you do need it in the this.setUnitPanel and this.setCommandPanel functions. As I said, I don't really understand why, but it seems to work for the various use cases I needed for the command system.

Thanks Okti, I've tried moving the functions into a separate worldscript and that seems to work. That said I'm still not sure whey this.storeMissileArray isn't persistent between functions, as I'm sure I've used variables in this way with other OXPs without too much trouble.

I'll put an update online shortly.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

Are you getting the missions?
I'm not getting any 'factorys in arriti' or 'X's on the space compass etc.
I always seem to fail no matter what, even with lots of enemies killed. :(
i'm sure I'm not that bad!

also, having given up on a mission (no factory) and headed off towards one of the other resistance enclaves, 2 things:
my squadron has ceased to appear outside the main station (because the mission is over/aborted?) but they do appear after hyperspace.

And, not a problem, but possibly a part of the mechanics of the story should be expanded on. Maybe we should automatically be classed 'fugitive' when entering Zabe, or Biesmaan?
is that possible?

I think it's much more user friendly having the 'select all' and 'attack target' on the 1st pylons. they're the most likely that you'll need in a hurry, like when under attack.

do you hate me yet? :D

I hope not. it's my favorite OXP!

Suddenly the Oooniverse isn't so lonely any more!

'Hired Guns' should maybe work like this.

All sorts of future missions potential.

Congratulations!


ps, they seem to be not flying into the station so much now. it was probably something to do with the large station.
Maybe they should have a 1st AI *(on Launch) of scouting, rather than getting in formation?
Image
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Re: [RELEASE] Resistance Commander

Post by Yodeebe »

Ramirez wrote:
It seems you don't need the duplicate entry in the this.initialisePanel function, but you do need it in the this.setUnitPanel and this.setCommandPanel functions.
Thats the one :)
Image
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: [RELEASE] Resistance Commander

Post by Ramirez »

I've uploaded a version 1.1 to my site with various corrections and improvements.
Yodeebe wrote:
Are you getting the missions?
I'm not getting any 'factorys in arriti' or 'X's on the space compass etc.
I always seem to fail no matter what, even with lots of enemies killed. :(
i'm sure I'm not that bad!
I found some typos in the script that meant some of the targets like factories weren't being generated properly. They should be working OK now, though you'll need to abort the mission and get a new one.

FYI the scoring works like this: for each mission there are around 100 points up for grabs. Where the mission involves a primary target this will be worth something like 40 points, with the rest of the opfor ships making up the remainder. So long as you complete the primary objective, the mission is regarded as a success and the points will be added to bluefor's morale. Conversely, if you fail a mission then a standard number of points will be deducted.
also, having given up on a mission (no factory) and headed off towards one of the other resistance enclaves, 2 things:
my squadron has ceased to appear outside the main station (because the mission is over/aborted?) but they do appear after hyperspace.
I've fixed that in the script.
And, not a problem, but possibly a part of the mechanics of the story should be expanded on. Maybe we should automatically be classed 'fugitive' when entering Zabe, or Biesmaan?
is that possible?
I'm looking to build this up as I work on the more detailed endgame - at the moment both Biesmaan or Zabe are effectively empty. For the initial release I wanted to focus on the getting the core mechanics working and also making the script as flexible as possible.
I think it's much more user friendly having the 'select all' and 'attack target' on the 1st pylons. they're the most likely that you'll need in a hurry, like when under attack.
To be honest I prefer the current order just 'cause I'm used to it and I think it works better with the icon set - however I've put all the functions into a standalone script and have added a note to the readme to explain how you can customise the order to suit your needs.
do you hate me yet? :D
Unfortunately it takes me so long so write this stuff that I don't get much time to do rigorous playtesting, so this is just the kind of feedback I need.
Download Resistance Commander plus many other exciting OXPs HERE
commanderxairon
Deadly
Deadly
Posts: 163
Joined: Mon Aug 22, 2011 3:16 am

Re: [RELEASE] Resistance Commander

Post by commanderxairon »

using the savegame you published it started to run, but the first mission only gaved me a single biesmaan asp o.o and lots of ships waiting to dock?? o.o
Pirate Commander: I would taken over Anleis and maked the first pirate system on this Ooniverse and become the monarch of all that empire if This stupid boy and his ship would'nt interfeer

Kuroshido(RXS-mariana) : scooby doobi doo?....

MY CREW
Post Reply