Reminder: Internet Explorer 6 or below are NOT supported.





There are currently 103 users playing Freelancer on
41 servers. | January. 23, 2021 |
The Starport Forum Index
>
All Posts
The Magic behind Random Missions and Difficulty |
||||
---|---|---|---|---|
Just can't stay away
![]() ![]() Joined:
2010/2/17 20:45 From Germany
Group:
Registered Users Senior Members
Posts:
486
![]() |
Table of Contents:
Difficulty A basic requirement and variable for random missions is the Difficulty. It is an arbitrary decimal number in a range of [0, 100] (meaning 0 and 100 are included). If needed the maximum difficulty can be adjusted by those offsets: Code: content.dll, 1143D4, 100f = maximum value of misn difficulty Difficulty Calculation for Job Offers (mBase.ini) A key to understand how Difficulty works is the way how it is used and calculated. This is unfortunately not very easy to understand at first. The main use is within mBase.ini where the values are set which difficulty a player can get from a base or NPC. The difficulty number displayed in-game when reading a mission offer has a somewhat direct connection to the chosen technical difficulty behind. Apparently those in-game numbers are hard-coded somewhere for specific difficulty values. Commonly the mission_type parameter can be understood as: Code: mission_type = DestroyMission, <minDiff>, <maxDiff>, <weight> The weight is an arbitrary value, usually chosen between 0 and including 100, in a way that the sum of all mission_types of a base are 100. This may not be necessary however. minDiff and maxDiff are important for the calculation of the real Difficulty that will be available for the player. Especially important is to note that maxDiff is not necessarily really the maximum. The calculations are as follows: Single Player Code:
Multi Player Code: rnd is a random value in range of [0, 3) Looking especially on the first part of the multiplayer-specific calculation shows that maxDiff is not a constant value, but is getting multiplied by a random factor. This can make multiplayer missions go beyond the naively intended levels. To understand the influence of the minDiff and maxDiff values in those calculations I do recommend to look on a graph plot for some simple values. As an example in multiplayer when minDiff is 0 and maxDiff is 1 in the final calculation, the graph looks like this If minDiff and maxDiff are swapped interesting results like this can be achieved. In those plots the left axis shows the probability to get the mission, whereas the lower axis shows the difficulty level to get. To limit the difficulty in multiplayer between the minDiff and maxDiff value, the following patch can be applied on Content.dll using bwpatchw. Code: # Make MP job difficulty exactly between min and max difficulty in mbases.ini. Amount of NPCs created by Difficulty and NPC Level (npcranktodiff.ini) It is possible to define exactly how many NPCs of a specific level are being created for a specific Difficulty. This is handled within the npcranktodiff.ini. A line looks as follows: Code: NpcRank = <NPC Level>, <Difficulty for 1 Ship>, <Difficulty for 2 Ships>, <Difficulty for 3 Ships>, ... Important to note:
The game uses a table of weights to define a preference for the amount of ships being spawned. It is as follows: Code: Ships SP MP This means the game tries to spawn 3 ships in singleplayer, or 4 ships in multiplayer, much more often than any other ships. As you can see, 1 ship has weight of 0. This means the game never will pick an NpcRank where the Difficulty for only the first ship would match. This table is very important to keep in mind. At any Difficulty picked, there always should be NpcRanks defined that cover all those ship counts. If you notice your job-board being more empty than it should be, it could be that the game tries to pick a ship count which is not provided for the current Difficulty. This table can be adjusted at the offset 11CC58 in Content.dll. First are the weights for singleplayer (starting for 0 ships, 1 ship, 2 ships, etc.) and after that for multiplayer (also starting for 0 ships, 1 ship, ...). If you want to allow NpcRanks with more than 8 ships being spawned, you must create your own weight-table. Code: content.dll 0F8A4B 58CCFB->00CBFC = use 30-float array at 12CB08 (created manually!) for SP ship weighting vector ~adoxa Requirements to have Missions offered on a Base There are 4 requirements that must be met to have a mission of a specific Difficulty being offered to a player:
This sounds quite daunting, so let's explain this on an example: We want to have some faction offer missions against fc_lr_grp in our system. For this we at first need a mission zone: Code: [Zone] Now we must make sure the enemy spawns within this zone, so it will get selected by the game to be associated with this enemy faction. Code: [Zone] Now we must find out which Difficulty our mission may have. For this we check in our mBase.ini: Code: mission_type = DestroyMission, 0, 0.112387, 100 With this value we now go into our npcranktodiff.ini file and look which line might match. Keep in mind the game has certain weights on how many ships it prefers to spawn (see above chapter). One of the possible NpcRanks might be: Code: NpcRank = 1, 0.00985, 0.03569, 0.07754, 0.13539, 0.20923, 0.29908, 0.40493, 0.52677 With this we know that we want to spawn level 1 NPCs. Now we must make sure fc_lr_grp has at least one ship matching this with an npc_class of class_fighter: Code: [NPCShipArch] We see that the level=d1, matching our NpcRank. And we see the npc_class contains d1 and class_fighter, so it also can spawn the ship. Important to know is that one ship with the required level must exist. But it does not need to be the same ship that is being spawned. The ships that will be spawned are determined by their matching npc_class label. Meaning that if your ship has d1, but npc_class d100, it will not be spawned. You can and must have at least one (but it can be another) ship with a matching npc_class diff-label for d1, and class_fighter. Important here is that whatever ship has the matching npc_class must match the level +1. So we could say we have a level d2 ship with npc_class=diff1, class_fighter, it would be able to be spawned. But only if there is another ship defined somewhere that has level=d1. This may look like this and still get spawned in our d1 mission: Code: [NPCShipArch] Payment by Difficulty (diff2money.ini) Defining payments for specific Difficulties is very easy and straight-forward to be done in diff2money.ini. A line looks as follows: Code: Diff2Money = <Start Difficulty>, <Payment> You can add as many or as few of those lines as you like. The payments between each defined Difficulty are linearly interpolated. You should at least provide a line for Difficulty 0 and 100 to allow the game to compute any payments between.
Posted on: Today 0:36
|
|||
How to create .SUR files - Tutorial | ||||
|
Re: New Renderer (OpenGL 3.3) |
||||
---|---|---|---|---|
Just popping in
![]() ![]() Joined:
Yesterday 12:23 Group:
Registered Users
Posts:
1
![]() |
Just wanted to drop in and thank you for working on this. It's amazing work well beyond what I can do. Would love to be able to work on shader creation and implementing it one day. For now, it's just creating more content, haha.
I'd like to learn about shaders, but how are you even getting it into the game? Are you having to write it and then inject a DLL into the game .exe so it can have those resources? Or is there another way you're managing to get it loaded? Curious. Hope you're both well and progress is still going well, too.
Posted on: Yesterday 12:33
|
|||
|
Re: Maximum number available for equipment |
||||
---|---|---|---|---|
Just can't stay away
![]() ![]() Joined:
2010/2/17 20:45 From Germany
Group:
Registered Users Senior Members
Posts:
486
![]() |
Quote:
Not the size, but it may be there is a buffer overflow. Meaning there are more items added to the game than it can handle, and things beginning to act up internally and overwriting each other in unpredictable ways.
Posted on: Yesterday 1:17
|
|||
How to create .SUR files - Tutorial | ||||
|
Re: I finally got the Original Game Soundtrack on CD!! |
||||
---|---|---|---|---|
![]() Joined:
2017/9/23 11:45 From Tatooine
Group:
Registered Users
Posts:
24
![]() |
is there a long version of planet manhattan's music ? the one that used on beta version ?
Posted on: 1/18 18:37
|
|||
![]() |
||||
|
Re: Maximum number available for equipment |
||||
---|---|---|---|---|
![]() Joined:
2019/1/22 4:34 Group:
Registered Users
Posts:
37
![]() |
nothing to do with the size of the game.
Posted on: 1/17 8:29
|
|||
|
Re: Freelancer OST Remaster release thread |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/6/13 10:58 From France
Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
501
![]() |
Great news !
![]() ModDB has some weird behavior sometimes. I think they fix things.
Posted on: 1/13 17:53
|
|||
|
Re: Freelancer OST Remaster release thread |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/5/21 19:32 Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
935
![]() |
I downloaded it to a different computer on a different network and it worked there. Then when I got home I tried again on my machine and it worked. Weird...
Posted on: 1/12 0:40
|
|||
Gun control is like fighting drunk driving by making it harder for sober people to buy a car... | ||||
|
Re: Maximum number available for equipment |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/9/11 15:55 From Somewhere at Moscow
Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
1765
![]() |
32 bit game wont adress above 4gb?
Posted on: 1/7 12:29
|
|||
Open Sirius Mod | ||||
|
Re: Freelancer OST Remaster release thread |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/6/13 10:58 From France
Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
501
![]() |
Did you try to open it with another software ? WinZip ? 7Zip ?
Posted on: 1/4 10:49
|
|||
|
Re: [WIP] Ale Effect Editor |
||||
---|---|---|---|---|
Starport Staff
![]() ![]() Joined:
2008/10/25 17:58 From On my way back
Group:
Registered Users Starport Staff FLServer Admins
Posts:
347
![]() |
Posted on: 12/30 10:39
|
|||
|
Re: [WIP] Ale Effect Editor |
||||
---|---|---|---|---|
Just popping in
![]() ![]() Joined:
12/29 7:12 From India
Group:
Registered Users
Posts:
2
![]() |
Any update on the same?
Posted on: 12/30 4:57
|
|||
For he who shall spit in the fire and take the blade | ||||
|
Re: Greetings from Asylum 51 |
||||
---|---|---|---|---|
Just popping in
![]() ![]() Joined:
12/29 7:12 From India
Group:
Registered Users
Posts:
2
![]() |
Thank you, my dear friend, and godspeed!
Posted on: 12/30 4:50
|
|||
For he who shall spit in the fire and take the blade | ||||
|
Re: Freelancer OST Remaster release thread |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/5/21 19:32 Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
935
![]() |
Same problem, tried a different mirror, even a different PC.
Posted on: 12/29 2:31
|
|||
Gun control is like fighting drunk driving by making it harder for sober people to buy a car... | ||||
|
Maximum number available for equipment |
||||
---|---|---|---|---|
![]() Joined:
2019/1/22 4:34 Group:
Registered Users
Posts:
37
![]() |
Well, it could be hard to understand. So I'll post some images.
![]() Apparently, Freelancer has a maximum acceptable number for equipment (or commodity) in total. The value of this number is around 4k. Over this, no effect will be shown and you cannot launch new games. However, you can still get into the main menu with a strange background, only models floating around. ![]() So, can we disable this limit or there is nothing we can do about it?
Posted on: 12/26 4:58
|
|||
|
Re: I finally got the Original Game Soundtrack on CD!! |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2010/6/13 10:58 From France
Group:
Registered Users $$$ Supporters $$$ Senior Members
Posts:
501
![]() |
Posted on: 12/25 21:07
|
|||
|