MissionFramework for 1.08a

A place to discuss mods in development and concepts for new mods.
Post Reply
giantcabbage
Militia Lieutenant
Militia Lieutenant
Posts: 104
Joined: Thu Apr 07, 2011 9:05 pm

Mission framework has been updated again and is intended for v1.08. Most of the changes are to the framework to make it easier to create missions, rather than adding new missions.

1) <OnSystemCreated> missions now work (the Centauri occupation is now an example of this)

2) Most text strings are now defined in the <Language> element instead of <StaticData> or in script. Text strings can be dynamically overridden by using object data e.g. objdata textName will replace <Text id=Name>

3) New dockscreen for displaying simple success/failure messages. This treats any items / cash stored on the mission as the reward.

4) <GetDockScreen> event for missions. This behaves like <GetGlobalDockScreen> except it is called once for each active mission object. This is used in the new Centauri occupation mission. Other missions use the msfSetDockScreen function.

5) <OnPaneInit> event for missions. Similar to OnGlobalPaneInit, but only called for active mission objects. Used in the Centauri occupation mission.
Attachments
MissionFramework.zip
(32.18 KiB) Downloaded 230 times
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Nice work! This will be great when I finally start working on missions for Sandbox....
(Topology isn't very nice to get through :/ )
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

giantcabbage wrote:Mission framework has been updated again and is intended for v1.08. Most of the changes are to the framework to make it easier to create missions, rather than adding new missions.

1) <OnSystemCreated> missions now work (the Centauri occupation is now an example of this)

2) Most text strings are now defined in the <Language> element instead of <StaticData> or in script. Text strings can be dynamically overridden by using object data e.g. objdata textName will replace <Text id=Name>

3) New dockscreen for displaying simple success/failure messages. This treats any items / cash stored on the mission as the reward.

4) <GetDockScreen> event for missions. This behaves like <GetGlobalDockScreen> except it is called once for each active mission object. This is used in the new Centauri occupation mission. Other missions use the msfSetDockScreen function.

5) <OnPaneInit> event for missions. Similar to OnGlobalPaneInit, but only called for active mission objects. Used in the Centauri occupation mission.
I STILL play your original and I was just using it in 1.08 :) ( because I wanted the Thumpers in my game, I love those :) )

However: Missions, Mining, Credits : fighting and Fun.........a MUST HAVE :)

THANK YOU :)
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Can I request a function?
It would be:

Code: Select all

(CreateMission
type of Dockscreen for mission
type of mission (escort/destroy target/ cargo delivery, etc)
details of mission (like specifying a target for escort)
text to set for the DS
possible text for accepting
possible text for denying
)
I'd imagine that this could be attatched onto an action in a dockscreen.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

RPC wrote:Can I request a function?
It would be:

Code: Select all

(CreateMission
type of Dockscreen for mission
type of mission (escort/destroy target/ cargo delivery, etc)
details of mission (like specifying a target for escort)
text to set for the DS
possible text for accepting
possible text for denying
)
I'd imagine that this could be attatched onto an action in a dockscreen.
ENTITY dsmission already exists : the game uses it for the Fleet Missions.
I think you went off the "deep end of No Caffine " and forgot to expand the subject to "self generation of missions" based on station status : station being attacked often : send player after the attacking Sov .

However : I think such a item would go well with Dynamic Systems because you already have the Retaliations : so to expand on it with the dsMission and station specific self generation for a DySys test would be easier for you to experiment with then simply trying to buuild it from scratch without the retaliation frame supporting it.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
giantcabbage
Militia Lieutenant
Militia Lieutenant
Posts: 104
Joined: Thu Apr 07, 2011 9:05 pm

Thanks for the suggestion. I don’t have much free time to work on the framework at the moment, but when I get back to it I’ll try and add what you want.

At the moment you can do some of what you want with a few separate function calls e.g.:

Code: Select all

(setq mission (msfCreateMission missionUNID parentStation))
(objSetData mission 'textIntro "Welcome..")
(objSetData mission 'textSuccess "blah blah")
RPC wrote:Can I request a function?
It would be:

Code: Select all

(CreateMission
type of Dockscreen for mission
type of mission (escort/destroy target/ cargo delivery, etc)
What exactly do you mean by the type of Dockscreen for mission argument? Do you want a way to override the success/failure screens used by a particular mission? If the mission uses the default dsMissionDone dockscreen, then you could use objSetData as above.
RPC wrote:

Code: Select all

details of mission (like specifying a target for escort)
Specifying optional arguments e.g. targets etc. for a mission is something I definitely want to add. However, each mission type will want a different set of arguments which could make a single create function a bit messy. I'll probably start just by adding a single argument (target) which would work for the basic destroy / deliver missions.
RPC wrote:I'd imagine that this could be attatched onto an action in a dockscreen.
Was the idea that selecting the action would create the mission and display the relevant mission intro screen?
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

I think

Code: Select all

(setq mission (msfCreateMission missionUNID parentStation))
(objSetData mission 'textIntro "Welcome..")
(objSetData mission 'textSuccess "blah blah")
can cut it.

Sorry if I wasn't clear earlier.
Was the idea that selecting the action would create the mission and display the relevant mission intro screen?
Yes, the idea was that I could do something like this:

Code: Select all

<Action name="Mission" key="M">
	(CreateMission
		&dsGenericEscortMission <-- would probably use ScrShowScreen or ScrShowPane to show the mission data
		'Escort <-- specifying this would determine what details are needed
		(SysFindObject gSouce "Ns +freighter;") <--- would be something like the target
		"This freighter is carrying an ambassador to a Huari fortress, blah blah blah" <-- the screen info, probably would use scrSetDesc.
		"Thank you for helping the Commonwealth in this valuable diplomatic mission." <-- screen info if the player accepts
		"You better hope the next guy doesn't mess the mission up." <-- screen info if the player rejects
		)
</Action>
Looking at your code, I think it would be doable, and that this function might be a conglomeration of your earlier suggestions.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Post Reply