[MOD] Unoffical Patch : V1.3.15 : 2024-03-31

The place to discuss scripting and game modifications for X³: Farnham's Legacy

Moderators: Moderators for English X Forum, Scripting / Modding Moderators, Moderators for the X3:FL Forums

Post Reply
Deniskos
Posts: 154
Joined: Wed, 11. Jun 08, 21:40
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Deniskos » Tue, 28. Nov 23, 16:35

The lib.xml.get.data.xml script incorrectly processes an array with a zero size. At the output, one null element appears in the array.
I did this for myself:
Show

Code: Select all

    else if$node.name == 'array'
      $array.size=xml get attribute: data=$a.xmlData, attribute='size'
      $children.count=xml get number of children: $a.xmlData
      if$array.size
        $return.data=array alloc: size=$array.size
        $i=0
        while$i < $children.count
          $child=xml get child: $a.xmlData, id=$i
          $child.name=xml get attribute: data=$child, attribute='name'
@         $ret=[THIS] -> call script lib.xml.get.data :  XML Data=$child
          ifis datatype[ $ret ] == DATATYPE_ARRAY
            $child.name=$ret[0]
            $ret=$ret[1]
          end
          
          do ifis datatype[ $child.name ] == DATATYPE_STRING
            $child.name=string $child.name to integer
          
          skip if$child.name
            $child.name=0
          
          $return.data[$child.name] = $ret
          inc $i=
        end
        
      else
        $return.data=array alloc: size=0
      end
      
      $return.data=create new array, arguments=$name, $return.data, null, null, null
I took my whole brain out until I figured out where this null comes from :evil:
lib.xml.get.data.rar
Last edited by Deniskos on Tue, 28. Nov 23, 16:54, edited 2 times in total.

Deniskos
Posts: 154
Joined: Wed, 11. Jun 08, 21:40
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Deniskos » Tue, 28. Nov 23, 16:45

Also in the plugin.customstart.menu.pck script there are multiple errors with the context menu when selecting a headquarters and with loading a custom profile of saved starts.
plugin.customstart.menu.rar

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22229
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Cycrow » Tue, 28. Nov 23, 16:58

Is that with the normal version, or the one from the old plots mod ?

The later is fixed in the next version of the old plots

Deniskos
Posts: 154
Joined: Wed, 11. Jun 08, 21:40
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Deniskos » Tue, 28. Nov 23, 17:45

From OldPlots-V1.01-04.07.2023.
OK.

Deniskos
Posts: 154
Joined: Wed, 11. Jun 08, 21:40
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Deniskos » Mon, 4. Dec 23, 17:43

The lib.xml.add.data.xml script needs improvement. If there are '"' quotes in the name of an object or product, or simply in a line, the data file will not be read.
I fixed it like this:
Show

Code: Select all

.       
.
.
        $data=change datatype[$a.data] to DATATYPE_INT
      else
        $data=$a.data
        gosub sub.ConvertData
      end
      
      $String=sprintf: fmt='%s', $data, null, null, null, null
      $Find=find position of pattern '"' in $String
      if$Find
        $String=substitute in string $String: pattern '"' with '''
        $arguments['data'] = $String
      else
        $arguments['data'] = $data
      end
      
      gosub sub.StartTag
      gosub sub.AddLine
    end
  end
.
.
.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22229
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Cycrow » Mon, 4. Dec 23, 20:05

Ill have a look at that. It might be better to replace it with some escape character, so it could also be restored later

Tharrg
Posts: 257
Joined: Thu, 17. Feb 05, 16:09
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Tharrg » Tue, 5. Dec 23, 22:26

I got an assassination mission for Darkspace against Beryll.

"Thamass Yator is in objcet. sector.name@actor.ship@L2M101 ..."

Anyway does not make any sense, plus can't set guidance. I am using unofficial patch, TC+AP plots and colour-by-race mods. I have not completed the Terran spy mission so earth sectors are not available.

save https://drive.google.com/file/d/12xCm-D ... drive_link

BTW is there a Beryll corporation?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22229
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Cycrow » Wed, 6. Dec 23, 02:10

My guess is that the random ship selector couldn't get a ship for Beryll, so the target ship wasn't created.

Beryll should be an inactive race, it does exist but it should be disabled as they were never fully implemented

rudi_pioneer
Posts: 408
Joined: Fri, 2. Apr 21, 21:06
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by rudi_pioneer » Wed, 6. Dec 23, 22:51

Found the big rep drop issue! Let me know if intended, bug, or something i should change. My rep with boron is 5 green bars 13% (8 bars total), and drops to 4% one red bar (3 bars total) after split agent finishes full "increase notoriety" task with split.

Save: https://www.dropbox.com/scl/fi/b932b56r ... x127z&dl=0 (will happen in a minute with SETA)

Latest unofficial patch (1.3.12).

Globals changed:
SG_DYNRACE_MAXENEMYNOTO: 1000000
SG_DYNRACE_MIN_CAP: -500000

rudi_pioneer
Posts: 408
Joined: Fri, 2. Apr 21, 21:06
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by rudi_pioneer » Wed, 6. Dec 23, 23:42

rudi_pioneer wrote:
Wed, 6. Dec 23, 22:51
Found the big rep drop issue! Let me know if intended, bug, or something i should change. My rep with boron is 5 green bars 13% (8 bars total), and drops to 4% one red bar (3 bars total) after split agent finishes full "increase notoriety" task with split.

Save: https://www.dropbox.com/scl/fi/b932b56r ... x127z&dl=0 (will happen in a minute with SETA)

Latest unofficial patch (1.3.12).

Globals changed:
SG_DYNRACE_MAXENEMYNOTO: 1000000
SG_DYNRACE_MIN_CAP: -500000
Update: once i got tiny bit of boron rep in above scenario, then drastic drop doesn’t happen (i only lose few boxes). I tried more moderate global changes to test if that’s the issue but big drop still happens

Tharrg
Posts: 257
Joined: Thu, 17. Feb 05, 16:09
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Tharrg » Thu, 7. Dec 23, 21:23

rudi_pioneer wrote:
Wed, 6. Dec 23, 23:42
Update: once i got tiny bit of boron rep in above scenario, then drastic drop doesn’t happen (i only lose few boxes). I tried more moderate global changes to test if that’s the issue but big drop still happens
I get various random reputation changes with diplomacy. Like succeeding in stealing a jumpdrive from Terracorp results in a Terracorp gain of rep plus follow-on rep changers - I think. No idea if it's intended as nowhere does it say what should happen. Anyway, the change is small so I have just ignored it.

Wing2137
Posts: 24
Joined: Thu, 30. Jul 09, 08:39
xr

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Wing2137 » Sun, 10. Dec 23, 07:38

So, I recall awhile ago there being either a thread or post in this topic discussing the "Xtreme Tour Guide" mission in Farnham's Legacy. It was unable to be completed supposedly, since it requires a certain amount of Xenon Sectors, and FL is missing one in particular (can't remember which one). I believe it was fixed by you, Cycrow, in one of the previous versions of the Unofficial Patch.

Well, I ran into this mission the other night in Omicron Lyrae alpha, and decided to try and complete it. As you can see, it's description has been adjusted to indicate one less sector (even though the yellow text still indicates 11 instead of 10).

https://imgur.com/y8vXGUy

After I completed it, I was met with this message.

https://imgur.com/kr1N0Nv

I visited -11 sectors and lost some money as a result? Lol

Anyway, I thought I should report this, as it still seems to be a rather wonky mission in FL. Also adding in that I didn't deviate from my path and went from Xenon Sector to Xenon Sector. The only extra sector I visited was Omicron Lyrae beta, because I can't jump directly into alpha (no Gates or Jump Beacons in that sector). At that point though, I was already instructed to return to the station I started from. I can't imagine that visiting extra sectors would bug it out, since the mission states bonus sectors aren't counted anyway. Regardless, I figured that was worth mentioning as well.

DragonOfWar
Posts: 16
Joined: Fri, 8. Dec 23, 23:04

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by DragonOfWar » Fri, 15. Dec 23, 15:53

Do anyone has issues with quest about building stations for other factions? I took two different ones and whenever i try to build the quest's station the game crashes. I still can build stations for my own usage, but not the ones for npcs.

DragonOfWar
Posts: 16
Joined: Fri, 8. Dec 23, 23:04

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by DragonOfWar » Fri, 15. Dec 23, 23:32

My bad, I found the reason for the crashes, seems that there are some problems with that CSD mod for sectors going unclaimed at sector's stations destruction. :(

DragonOfWar
Posts: 16
Joined: Fri, 8. Dec 23, 23:04

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by DragonOfWar » Tue, 19. Dec 23, 10:01

@Cycrow Sorry to bother you, but can you do something about those M1 pirate ships please? The ships which are spawned at the start of the game. Those M1 ships and platforms want to kill player no mater what, they don't care about notoriety or even cheats (the one for sector reputation change).

The only way for me to change their behavior was to use a cheat's race ownership option. By changing those M1 ships ownership to Player and then making them Pirates again, they stopped their agressiveness, but it is quite a hassle to use cheats so much.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22229
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by Cycrow » Tue, 19. Dec 23, 11:57

I believe that might be a result of some hard coded pirate behaviour, I did try to remove some of it, bit it's possible there's another part of the code that's still doing it. I'll have to check

DragonOfWar
Posts: 16
Joined: Fri, 8. Dec 23, 23:04

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by DragonOfWar » Tue, 19. Dec 23, 13:56

Cycrow wrote:
Tue, 19. Dec 23, 11:57
I believe that might be a result of some hard coded pirate behaviour, I did try to remove some of it, bit it's possible there's another part of the code that's still doing it. I'll have to check
Thank you, will wait for it. I tried to make a script for changing race of all enemy pirate's ships at the player's owned ships sector entering... shame on me, but I was not able to make it work :oops:

lLongshanks
Posts: 273
Joined: Sat, 20. Mar 04, 23:46
x3tc

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by lLongshanks » Sat, 23. Dec 23, 00:07

I just installed this mod and most of my factories have disappeared from the properties menu. Also the game wont let me use an L station upgrade on an L silicon mine. Yes I know how to use them I have 4 others before I installed the patch. Removing the patch causes the game to crash but I was able to load a much earlier save and the problems are fixed.
Scripts I use.

DragonOfWar
Posts: 16
Joined: Fri, 8. Dec 23, 23:04

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by DragonOfWar » Sun, 24. Dec 23, 19:41

lLongshanks wrote:
Sat, 23. Dec 23, 00:07
I just installed this mod and most of my factories have disappeared from the properties menu. Also the game wont let me use an L station upgrade on an L silicon mine. Yes I know how to use them I have 4 others before I installed the patch. Removing the patch causes the game to crash but I was able to load a much earlier save and the problems are fixed.
Most mods don't work for me properly till I start a new game and turning off mods without starting a new game corrupts save files. :roll:

lLongshanks
Posts: 273
Joined: Sat, 20. Mar 04, 23:46
x3tc

Re: [MOD] Unoffical Patch : V1.3.12 : 2023-11-11

Post by lLongshanks » Sat, 30. Dec 23, 00:23

DragonOfWar wrote:
Sun, 24. Dec 23, 19:41
lLongshanks wrote:
Sat, 23. Dec 23, 00:07
I just installed this mod and most of my factories have disappeared from the properties menu. Also the game wont let me use an L station upgrade on an L silicon mine. Yes I know how to use them I have 4 others before I installed the patch. Removing the patch causes the game to crash but I was able to load a much earlier save and the problems are fixed.
Most mods don't work for me properly till I start a new game and turning off mods without starting a new game corrupts save files. :roll:
Thanks but I figured out the problem. The station was upgraded it just didnt change its name from L to XL but all the stats have changes. So back to using the patch again.
Scripts I use.

Post Reply

Return to “X³: Farnham's Legacy - Scripts and Modding”