MD questions

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

MD questions

Post by Aven Valkyr » Thu, 5. Mar 15, 16:26

In creating my Total War mod I will have several missions that vary in difficulty. The difficulty will not be of the pre-determined (easy to impossible) levels but instead be pre-scripted ship spawns based on the players assets, rank, etc. So here is the question:

Is there some mechanic in the game that assesses the players total combat capabilities? Would this be considered the fight rank?

Basically, this is what I want to do. There will be 4 - 5 degrees of difficulty on the endgame missions. Difficulty 1 will be easy and I've already determined that the agent will check to see if the player has at least an M7 before providing the mission. Difficulty 2 will require 2 or 3 M7's, a handful of M6's and several fighters. Difficulty 3 will require an M1, 2 M7's, and so on. So instead of checking for individual ships I would prefer to use a mechanic I'm asking about.

On that note, what exactly is fightrank and missionrank?

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Thu, 5. Mar 15, 18:57

Fight rank sounds like what your looking for however not for the same reasons. Fight rank increases over time as the player destroys things (also through other means but this is the main one).

While fight rank doesn't directly relate to the players assets, it is used in the base game to scale the difficulty of the game, it uses the logic of by the time you reach a high fight rank, you should have a decent amount of assets anyway because it does take some time. However if you want to be absolutely certain the player can handle himself before issuing the mission, i'd check directly for ship classes as you propose.

Mission ranks are the ranks in the individual mission sub-classes, each time you do a "fight" mission for example, your "fight" mission rank increases, this is a secondary scale for mission rewards.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Thu, 5. Mar 15, 19:58

hmm ok, thanks for the info. Looks like I'm going to have to make some sort of check handler that delivers the difficulty of the missions. I think I might combine the fight ranks with the handler to make a complete system. I am currently putting everything down on paper and organising how I'm going to do this. I haven't even touched a scrap of code yet but it's all starting to come together. The theory of it all anyway.

Do you happen to know what fight rank you need before you start seeing M7's in the kill missions?

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Thu, 5. Mar 15, 20:22

It's obviously up to you how to do this but I should add that I personally hate auto-scaling and hated that bit of vanilla X3 game (and hate it in most other games like Oblivion, etc). I loved the fact that in LU, the enemies basically have static difficulty. Personally, I would have been more involved in this community much earlier if something like LU was available earlier, when I played vanilla X3:TC years ago, using a single M6 I got my fight rank high (I was killing M7s and escorts with a single M6) that it became impossible to continue some plots because they spawned enemies according to fight rank, but contrary to the game's assumption that "by this time I likely have a fleet", I did not have a fleet so I just gave up on the game and felt I wasted my time thought of it as having broken mechanics.

Auto-leveled challenges breaks rewarding mechanisms, you don't feel satisfaction of going back and killing those nasty enemies that outclassed you before nor does it make much sense to improve your fight rank. In Oblivion and vanilla X3 it actually makes sense to avoid combat as much as possible which would make the plots easier, this of course, is a sign of broken game design.

Instead of automatically scaling mission difficulty with fight rank I would just provide options to select from very easy to very hard missions and if those levels aren't sufficient just introduce more difficulty levels, let the player have fun trying out an epic difficulty mission with just an M6, if that's what they want to do, IMO. It also rewards inquisitive thinking, if someone finds a way to beat the odds why not, instead of trying to "protect" them from their own actions.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Thu, 5. Mar 15, 20:43

hmm I see what you are getting at. I've had a closer look at the director definition file and it appears that there are mechanisms to check the players assets. I'm thinking I will make the difficulty based on assets alone. I will make it so you need a certain fight rank to talk to the agent in the first place and so that you must have at least an M7 in your collection. The mission texts will suggest you mobilize your fleet and send them to a sector in order to complete your objective. These "endgame" missions will assume you have a bit of an armada (if only an m7 and a couple of M6's at first). There is nothing saying you must use that said fleet to complete your mission. Whichever method you choose to complete the mission is up to you. However, I will release a small spoiler just to show you what you are up against:

Difficulty:

1:
1 M7
2 M6
12 M5

2:
2 M7
5 M6
10 M5

3:
3 M7
3 M6
6 M3
8 M4

4:
1 M1
1 M2
3 M6
10 M4

5:
2 M1
2 M2
2 M7
15 M3

Note that this is the regular difficulty ship spawns. There will be a 25% chance that the spawn is apocalyptic for each difficulty. The apocalyptic spawns are as follows:

1:
1 M7
3 M6
12 M4

2:
2 M7
10 M6

3:
4 M7
5 M6
10 M3

4:
2 M1
1 M2
5 M6
20 M5

5:
2 M1
3 M2
3 M7
8 M6
10 M3
10 M4
15 M5

So as you can see, completing these missions in an M6 may be extremely difficult. Perhaps the regular version of difficulty 1, yes. Anything past that, you WILL need a fleet. Heh..

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Thu, 5. Mar 15, 21:09

OK on further thought you are right. I will make it optional instead of forcing the player to run the missions the system feels they are capable of doing. When the agent is activated, the system will check the players assets and offer missions it feels the player is capable of taking on. The system will show all the degrees of difficulty of missions the agent has to offer up to the max level the player is capable of. The player can then select the mission they want based on the difficulty. This way, the player can run several missions of lesser difficulty with their superior forces and safely farm the missions for income and ships.

By ships I mean this:

There is a 25% chance that the mission will become apocalyptic. There is a further 25% chance on the apocalyptic missions that capturable ships will spawn. These ships will be heavily damaged and need repair. However, they will be fairly decently armed. These ships will be generally unobtainable through normal gameplay, such as ATF and Xenon ships. Of course, any faction that is negative to you could become the NPC spawn for the mission. It will be of those NPC's that the capturable ships will spawn.

Also, on difficulties 3, 4 and 5, certain missions have a chance of spawning both ships and structures, which are separate from the apocalyptic difficulties. So it would be greatly worth your while to run those missions, as the rewards for completing them increases vastly :)

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Thu, 5. Mar 15, 21:20

Oh and more on this mod. (spoilers). Version 1.0 of the mod will give the missions as I have discussed so far. Once released I will begin working on version 1.5, the terran technology mission arcs. There will be 2 mission arcs that will be replayable and 1 that can only be played once. The replayable mission arcs will be to secure terran factories and weapon forges. The 1 that is not replayable will be for a terran shipyard. If you love the terran ships as much as I do, but hate actually playing terran because their space is so damn broken, this will be the mod for you. The mission arcs will be a bit of a storyline, which will require you to jump into the war-torn sectors and complete other, various tasks. These arcs give you the ability to set up a fully function complex which manufactures terran weapons for the ships you acquire.

Once 1.5 is released, I will begin work on 2.0. This part of the mod will make the entire galaxy conquerable through the use of the mission agent. You will be able to launch an incursion into a sector. The GOD engine will be disabled in that sector until you destroy everything there. Once the mission is complete, control of the sector is turned over to the faction of your choice and the GOD engine is enabled again. Eventually, you will be able to conquer the whole galaxy. In the meanwhile, enemy NPC forces will be trying to take sectors of their own. So it will be a game of cat and mouse. Version 2.0 will be a huge undertaking though. There will be a lot of coding to do for it. Right now, I'm just focusing on getting 1.0 started and see how it goes from there.

Speaking of which, better get back to it ;)

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Fri, 6. Mar 15, 00:33

You seem to have a clear vision and whatever I or others say, it shouldn't deter you from implementing that vision or corrupt/change it.

That said, I wanted to clear out a bit about what I said on auto-leveling. I do not mind picking up a mission which is always hard or always easy, not even mind picking up some missions which vary with my level, what I do mind is when most things in the game (including unavoidable plot missions, you can't advance the plot without going through that mission) scale linearly with my level. Then I don't have a choice.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 6. Mar 15, 01:23

Some good thoughts there about scaling challenge versus static challenges.

I agree that a certain amount of static challenge is better for plots. If the plot is too hard, then come back later when you are stronger. That's good.

Similar with Hard and Very Hard missions. There is no reason that the player should be guaranteed of always being able to win those engagements.

However, there are other cases where *some* amount of scaling is important to making the game playable. If all Very Hard combat missions required you to fly an M2, then that would get old in a hurry.

Similar with bounty hunters chasing you. If they always came after you with a fleet of M2's, then you might find that overkill in your starter M5.

Clearly there is a lot of middle ground in between the extremes. A combination of scaling and player-manageable challenge is probably optimal.

Let the player choose whether he/she wants an easy game or a serious challenge, and do some intelligent scaling within those ranges. That dual-challenge system works extremely well in games such as Mass Effect.

Balancing is still a complex task, no matter how you manage combat challenge. But giving the player a choice is definitely better than not.

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Fri, 6. Mar 15, 04:32

Thanks guys I appreciate the input. I have already decided to make the various degrees of missions optional. The catch is that you will not be able to take the harder missions until the game detects that you have acquired certain hardware. Once it detects that you have, the next level of missions will be available. You will still be able to run the less difficult missions. When you activate the agent, instead of simply offering a mission, an actual window will pop up that allows you to choose what you want to do.

Let me reinforce that these missions are endgame content only. It in no way shape or form overwrites the native missions found in game. The scaling feature of the vanilla game will remain untouched. This is all exlusive, additional content, with its own ranking system based on your inventory. Of course, there will need to be a certain rank to talk to the agent in the first place, and that rank will be about 75% up the ladder.

So when the player talks to the agent, the mission is given. Upon arriving at the mission sector everything is spawned. There will be no chasing of player ships around the galaxy in their M2 vessels. It's not active pirate roaming fleets in which you come across one and the mission is delivered.

Also, while the rewards are great even for difficulty 1 and 2 (30 and 50 mil payouts respectively), the challenge is greatly increased for ranks 3, 4 and 5. The rewards are also vastly improved in the higher rank missions, where there will be chances of TL ships delivering rare or very expensive items. They payout for running an L5 is 250 mil cash. I think it should be worth the players while to do that ;) Also, there are chances of encountering apocalyptic spawns within each level of mission. The apocalyptic difficulty has a chance of dropping additional items in the form of enemy faction ships, namely terran, yaki, pirate and xenon ships. This can happen at any of the level, the chance that the apoc spawn happens, and then the further chance that a cappable ship spawns. But once again, these rewards scale to the level of mission the player takes.

Like I said, this is all above and beyond the vanilla system of doing things. My mod will not touch what is already there. If the player is tired of running insanely difficult missions with their fleet they can go back to doing whatever it is they want, as per the previous functions of the game :) I'm also formulating my missions so that everything is modular to make it compatible with total conversion mods like XRM and Xtended. So if new sectors have been added to these mods, it's simply a matter of opening the main module files and changing what needs to be changed in order to make it compatible.

The overall scope of this mod is to give people something to do with the big fleets other than randomly popping endlessly spawning enemies and testing their strength against the AI with no official reward system. The missions will be carefully formulated to fit with the theme of X3, as opposed to a simple, "go here and kill that". There is a reason the players are running these missions. There is a war raging, and I want the player to feel as if they are actually a part of it and making a difference. Right off the get-go the agents bring up dialog's that inform the player that they are assisting the faction they are working for to win the war. Especially when v2.0 of my mod gets released, when capturing systems will become a reality. v1.0 of the mod (the core) is mainly to give the players an extremely lucrative means of earning billions of credits for the fleet they are going to need to actually win. Basically every sector will need a player controlled fleet of some sorts, since while running incursions into enemy zones, the enemy will be running their own incursions into your faction's zones.

I hope this clears some things up. I do appreciate your feedback, and I am taking ppls ideas into consideration. Memeics already gave me the idea of being able to choose the level mission you want to run via a list. That is going to be implemented. I hadn't thought of that :)

And to ease one more of your concerns, you will not need an M2 to run all of these missions. The recommended hardware will (loosely) go as follows:

L1:
1 M7

L2:
1 M7
4 M6
5 M3

L3:
1 M7
1 M8
5 M6

L4:
1 M1
2 M7
1 M8

L5:
1 M2
2 M7
2 M8
10 M6

Keep in mind that these are both bare minimums, and they are also off the top of my head. If you run into an apocalyptic spawn with the bare minimum, you may get yourself destroyed unless you are hella confident in your skills :)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 6. Mar 15, 05:47

I recommend keeping your questions to a single thread, Aven.

It will be much easier to find the info that you want later.

Also, it makes it easier for others to follow your thread (or not), as they see fit.

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Fri, 6. Mar 15, 06:45

Ok bullwinkle will do :) I was wondering about that.. various thread for various functions of the MD. Wasn't sure if I should put them in the same thread or not lol.

Speaking of which I do have a question about MD, which are now going to be more specific than they were before.

I started the body of my script with <action>. Then I went to <do_all>. Next down was <check_all>, and my checks are within the that category. Oddly enough the popup menu's aren't showing. Do I have the check all function wrongly placed inside the action function? Also, when I run the check, what happens to the information? If it's found false I don't want it to notify me I just want it to do nothing. However, if the checks pass, then what? It moves down the script on its own and starts doing what the rest of the script tells it? Right now my script looks something like this:

<action>
<do_all>
<check_all>
<player_ship_count class="M7" min="1"/>
<player {player.fightrank.name}="fighter chief">
<player {player.notoriety.argon.name}="federation marshall">
</check_all>
<create_ship name="Zeus" class="m2" invincible="1" typename="SS_SH_A_M2" known="1" highlight="1" race="argon" sector="Home Of Light">
</do_all>

So basically, the check ensures that the player has at least an M7, has fight rank of fighter chief, and argon notoriety rank of federation marshall. I'm looking to create the ship, an argon Titan named Zeus, in the sector Home of Light. Does this look about right to you? After completing the check does the script move on to the next to the next part of creating the ship?


Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Fri, 6. Mar 15, 15:51

I've looked into all those links. They are helpful but not specific to what I'm trying to do (of course). I was hoping that someone with some actual MD experience would be able to help me along.

So here is what I have so far. I'm trying to use MD to spawn a ship. I've saved the file into a cat and copied it into my game directory. I load the game and go to the sector in question and the ship just isn't there. I've tried different variations. Would someone mind looking at my code? It's pretty simple

<cues>
<cue name="L100M2">
<documentation>
<content name="L100M2 Argon Agent"/>
</documentation>
<condition>
<check_all>
<player_ship_count class="M7" min="1"/>
<check_value min="{player.fightrank.name}@fighter chief"/>
<check_value min="{player.notoriety.argon.name}@federation marshall"/>
</check_all>
</condition>
<action>
<do_all>
<create_ship name="Zeus" class="m2" invincible="1" typename="SS_SH_A_M2" known="1" highlight="1" race="argon">
<sector sector="Home Of Light"/>
</create_ship>
</do_all>
</action>
</cue>
</cues>

So basically I want the game to check for the conditions and if they are met, spawns the ship. It doesn't seem to be working though. Any input would be greatly appreciated :)

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Fri, 6. Mar 15, 16:42

sorry I'm doing further research. I'm realizing that my code as of yet is totally wrong lol. Disregard my previous post :)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Fri, 6. Mar 15, 16:43

i see 3 possible issues with your code:

1) isnt the cue name "L100M2" already used by the Game? (i could be wrong there, have no installation to look it up)

2) your conditions have neither an event at which the other conditions should be checked nor a recheck-time specified - not sure how the Game acts in this case, but i think the conditions are then only checked once when the Script is added to the Game (at which point the conditions are not met so the cue never activates)
also the <check_value/>s look odd to me since they contain non-escaped spaces in the expression, but i may be wrong there
hint for testing (not sure if it works in X3, it does in XR though): leave the whole conditions-node out - this equals an always-true-condition and the Cue should trigger immediately

3)i am not really sure if you can adress Sectors by their Name directly, since they are not exactly the same in other languages

if i am wrong somewhere feel free to correct me - only have a bit expierience with the XR MD so far, which is a bit diffrent from the X3 one
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 6. Mar 15, 17:57

Aven Valkyr wrote:I was hoping that someone with some actual MD experience would be able to help me along.
They may. Unitrader and others have been making a good effort to help. I don't want to discourage that.

However, it may help you to know that there are only about five people in the world who really understand X3's MD well. (Six if you count Jens Ka, who has not posted in several years). None of them are currently working on X3.

Lack of English documentation and support are factors. Lack of a dedicated editor is perhaps worse.

A few of us hack at bits and pieces, and you may get a few tips here and there. But I'm not sure whether you can really expect a lot of coaching.

Not because nobody wants to help. Just because you are asking for help with something that is not well-supported.

MSCI, on the other hand, is well-supported, documented, and understood. X-Studio is an outstanding editor for it. MSCI is what the majority of us use for most development.

MSCI Programmer's Handbook
Cycrow's Scripting Guide
X-Studio Script Editor
  • (There are a few things that MD does better than MSCI, so we sometimes use small MD cues for those tasks. But the majority of code developed for X3 is in MSCI.)

    (One thing that has not been developed for MSCI is an open, well-supported, plot and mission framework. A couple of people have made small stabs at it, but there is nothing that could be called a "finished product". )

    (Instead of real missions, I recommend doing something else, using the tools that are available. You could make a "quest" which involves leaving clues or instructions for the player, and waiting for the player to complete the tasks and/or find the next clue. "Quest" is my made-up name for something that has not been done yet, but it would be relatively easy to do. Anything you do to add life to the game will be welcome. Especially if you continue on your path to do it in an open way, so that all players can enjoy it.)

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Fri, 6. Mar 15, 21:56

ok thank you so much for your help guys :) I actually had a very thorough read of the pdf file pertaining to the MD and I must say, it's extremely well written. I came out of it with a much better understanding of it all.

The thing that confused me the most was the use of variables, and naming objects. For example, the "@" symbol seen soooo often in the xml files can be read as "of". Also the naming of objects confused the shiiiiz out of me. But it's literally like this:

<spawn_ship name=this.zeus (this means this specific item, not all the items of that same time within the entire game) type="(specific variable given in the dropdown)">

So later on in the script, if I want to place an agent within the ship (which is exacly what I'm looking at doing) it would go something like this:

<create_agent name=aven valkyr@zeus>

See.. I'm learning :) Sooner or later I will be pro at this lol

My main goal right now is to create a "mission" that literally spawns a ship when the player conditions have been met (the ones I mentioned earlier in this post). As the player in my current game meets these criteria as soon as I load the game the ship should be there. Once I've managed to accomplish that, I will try to spawn an agent within that ship. Once successful, I will spawn a ship with an agent for each playable race in their main sectors. Then I will get working on the actual missions. It's going to be a bit of a haul but I'm getting there lol. Between reading the guides and reverse-engineering the current MD files, I should be a master at this and able to help on the forums answering other ppls questions too :)

UniTrader: In answer to your question, no. The default missions are 0.* for the core foundations, 2.* for the offered missions, and 3.* for the plot missions. My missions will start at 100. So they are far far far away from the native missions and hopefully won't conflict with anyone else's missions either :)

Aven Valkyr
Posts: 228
Joined: Thu, 13. Mar 14, 23:52
x3ap

Post by Aven Valkyr » Fri, 6. Mar 15, 22:44

ugh REALLY dumb question but.. to incorporate the mission back into the game, I open the x3 editor, create a new cat, name it the next cat up from what's in the game folder (in my case, 05). Then inside the cat I create the addon folder, and in that folder the director folder. Then I copy my new xml file into the director folder, and copy the cat file into my game system folder. When I load the game, the new xml file should already be running. Is this correct? My mission just doesn't seem to want to load :(

Another question, when referring to sectors using X,Y, X is across, and Y is up and down correct?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 6. Mar 15, 23:14

If you put your .xml file into a .cat, then you will also have to add the name of the file to mdfiles (without the .xml extension).

If you simply put your .xml file in addon\director under your game folder, then it is not necessary to update mdfiles (as long as you do not have mdfiles in the same folder, in which case you *do* have to update it).

"This" means "this cue". It is usually considered "best practice" to explicitly name references rather than using "this". Then you can copy and paste your code elsewhere and it will still work.

Yes, x is across.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”