[INFO] To all people reading that economy is fake - it's not

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

soundslikerust
Posts: 42
Joined: Mon, 5. Jan 15, 05:43
x3ap

[INFO] To all people reading that economy is fake - it's not

Post by soundslikerust »

There are some "programmers" on steam forums talking about fake economy code. Don't listen to it it's made up. I cant paste all game scripts here but look at the topmost file from economy logic (I had to cut it in half sorry).
There is much much more economy code in game.
Faction Managers logic making goals and sub goals for different factions, planning invasions, reacting, making reconnaissance!, planning staging areas, planning building stations and much more.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="FactionLogic_Economy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
  <cues>

    <!--TODO @Owen - if traffic levels for a station are at a sustained high level, build a dock area-->

    <!--Helper libraries-->

    <library name="UpdateSectorNeighbourTable">
      <actions>
        <assert value="$Faction? and $SectorNeighbourTable?" text="'Variable $Faction or $SectorNeighbourTable not set. [Owen]'" break="1"/>
        <!--TODO @Owen take contested into account-->
        <do_if value="$Faction? and $SectorNeighbourTable?">
          <clear_table table="$SectorNeighbourTable"/>
          <find_sector name="$Sectors" owner="$Faction" multiple="true"/>
          <do_all exact="$Sectors.count" counter="$USNT_i">
            <set_value name="$Neighbours" exact="[]"/>
            <set_value name="$SectorNeighbourTable.{$Sectors.{$USNT_i}}" exact="$Neighbours"/>
            <find_cluster_in_range name="$Clusters" object="$Sectors.{$USNT_i}" maxdistance="1" multiple="true"/>
            <do_all exact="$Clusters.count" counter="$USNT_k">
              <find_sector name="$Neighbours" owner="$Faction" space="$Clusters.{$USNT_k}" multiple="true" append="true"/>
            </do_all>
          </do_all>
        </do_if>
      </actions>
    </library>

    <!--Faction economy library-->
    <library name="Econ_Manager" namespace="this">
      <params>
        <param name="FactionManagerCue"/>
        <param name="Faction"/>
        <param name="DebugChance" default="0"/>
      </params>
      <actions>
        <set_value name="$DebugText" exact="'(' + $Faction.id + ') Econ_Manager - '"/>
        <set_value name="$Reports" exact="table[]"/>

        <!--Table of actions the faction has attemtped to fix economic problems.-->
        <!--Key is by sector, value is the list of actions-->
        <set_value name="$ActionReports" exact="table[]"/>

        <!--Table of sectors within 1 jump of the sector (including itself)-->
        <set_value name="$SectorNeighbourTable" exact="table[]"/>
        <include_actions ref="md.FactionLogic_Economy.UpdateSectorNeighbourTable"/>

        <set_value name="$InsufficientProductsTable" exact="table[]"/>
        <set_value name="$ShortageProductsTable" exact="table[]"/>
        <set_value name="$InsufficientWorkforceTable" exact="table[]"/>
        <set_value name="$ShortageWorkforceTable" exact="table[]"/>
        <set_value name="$InsufficientBuildTable" exact="table[]"/>
        <set_value name="$ShortageBuildTable" exact="table[]"/>

        <!--Aggregated tables have the Ware as key and the value is the aggregated time of all reports for that ware-->
        <set_value name="$AggregatedInsufficientProductsTable" exact="table[]"/>
        <set_value name="$AggregatedShortageProductsTable" exact="table[]"/>
        <set_value name="$AggregatedInsufficientWorkforceTable" exact="table[]"/>
        <set_value name="$AggregatedShortageWorkforceTable" exact="table[]"/>
        <set_value name="$AggregatedInsufficientBuildTable" exact="table[]"/>
        <set_value name="$AggregatedShortageBuildTable" exact="table[]"/>

        <!--Table of sectors which contain ware tables of aggregated report values-->
        <set_value name="$SectorInsufficientProductsTable" exact="table[]"/>
        <set_value name="$SectorShortageProductsTable" exact="table[]"/>
        <set_value name="$SectorInsufficientWorkforceTable" exact="table[]"/>
        <set_value name="$SectorShortageWorkforceTable" exact="table[]"/>
        <set_value name="$SectorInsufficientBuildTable" exact="table[]"/>
        <set_value name="$SectorShortageBuildTable" exact="table[]"/>
      </actions>
      <cues>
        <cue name="RespondToShortageData" instantiate="true">
          <conditions>
            <event_cue_signalled cue="md.FactionLogic_Economy.ShortageDataGenerated"/>
          </conditions>
          <delay min="1s" max="5s"/>
          <actions>
            <signal_cue cue="EvaluateShortages"/>
          </actions>
        </cue>

        <cue name="EvaluateShortages" instantiate="true">
          <conditions>
            <event_cue_signalled/>
            <check_value value="md.FactionLogic_Economy.GenerateShortageData.state == cuestate.waiting"/>
          </conditions>
          <actions>
            <set_value name="$DebugChance" exact="0"/>

            <include_actions ref="md.FactionLogic_Economy.UpdateSectorNeighbourTable"/>

            <do_if value="@md.FactionLogic_Economy.GlobalStorageData.$Reports">
              <set_value name="$OwnerReports" exact="@md.FactionLogic_Economy.GlobalStorageData.$Reports.{$Faction}"/>
              <do_if value="$OwnerReports">
                <clear_table table="$InsufficientProductsTable"/>
                <clear_table table="$ShortageProductsTable"/>
                <clear_table table="$InsufficientWorkforceTable"/>
                <clear_table table="$ShortageWorkforceTable"/>
                <clear_table table="$InsufficientBuildTable"/>
                <clear_table table="$ShortageBuildTable"/>

                <!--Aggregated tables have the Ware as key and the value is the aggregated time of all reports for that ware-->
                <clear_table table="$AggregatedInsufficientProductsTable"/>
                <clear_table table="$AggregatedShortageProductsTable"/>
                <clear_table table="$AggregatedInsufficientWorkforceTable"/>
                <clear_table table="$AggregatedShortageWorkforceTable"/>
                <clear_table table="$AggregatedInsufficientBuildTable"/>
                <clear_table table="$AggregatedShortageBuildTable"/>

                <!--Table of sectors which contain ware tables of aggregated report values-->
                <clear_table table="$SectorInsufficientProductsTable"/>
                <clear_table table="$SectorShortageProductsTable"/>
                <clear_table table="$SectorInsufficientWorkforceTable"/>
                <clear_table table="$SectorShortageWorkforceTable"/>
                <clear_table table="$SectorInsufficientBuildTable"/>
                <clear_table table="$SectorShortageBuildTable"/>

                <set_value name="$TableRef" exact="null"/>
                <set_value name="$TableRefKeys" exact="null"/>
                <set_value name="$ReportKeys" exact="$OwnerReports.keys.list"/>
                <do_all exact="$ReportKeys.count" counter="$i">
                  <set_value name="$Station" exact="$ReportKeys.{$i}"/>
                  <set_value name="$Sector" exact="$Station.sector"/>

                  <!--Insufficient Production Wares-->
                  <do_if value="$OwnerReports.{$Station}.{'$InsufficientProductionWares'}?">
                    <set_value name="$TableRef" exact="$OwnerReports.{$Station}.{'$InsufficientProductionWares'}"/>
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$k">
                      <set_value name="$Ware" exact="$TableRefKeys.{$k}"/>
                      <set_value name="$ReportValue" exact="$TableRef.{$Ware}"/>
                      <set_value name="$AggregatedInsufficientProductsTable.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_if value="not $SectorInsufficientProductsTable.{$Sector}?">
                        <set_value name="$SectorInsufficientProductsTable.{$Sector}" exact="table[]"/>
                      </do_if>
                      <set_value name="$SectorInsufficientProductsTable.{$Sector}.{$Ware}" exact="$ReportValue" operation="add"/>
                      <!--Avoid clashes by adding a little to the report value-->
                      <do_while value="$InsufficientProductsTable.{$ReportValue}?">
                        <set_value name="$ReportValue" exact="1" operation="add"/>
                      </do_while>
                      <set_value name="$InsufficientProductsTable.{$ReportValue}" exact="table[{'$Station'} = $Station, {'$Ware'} = $Ware]"/>
                    </do_all>
                  </do_if>

                  <!--Production wares in short supply-->
                  <do_if value="$OwnerReports.{$Station}.{'$ShortageProductionWares'}?">
                    <set_value name="$TableRef" exact="$OwnerReports.{$Station}.{'$ShortageProductionWares'}"/>
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$k">
                      <set_value name="$Ware" exact="$TableRefKeys.{$k}"/>
                      <set_value name="$ReportValue" exact="$TableRef.{$Ware}"/>
                      <set_value name="$AggregatedShortageProductsTable.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_if value="not $SectorShortageProductsTable.{$Sector}?">
                        <set_value name="$SectorShortageProductsTable.{$Sector}" exact="table[]"/>
                      </do_if>
                      <set_value name="$SectorShortageProductsTable.{$Sector}.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_while value="$ShortageProductsTable.{$ReportValue}?">
                        <set_value name="$ReportValue" exact="1" operation="add"/>
                      </do_while>
                      <set_value name="$ShortageProductsTable.{$ReportValue}" exact="table[{'$Station'} = $Station, {'$Ware'} = $Ware]"/>
                    </do_all>
                  </do_if>

                  <!--Insufficient Workforce Wares-->
                  <do_if value="$OwnerReports.{$Station}.{'$InsufficientWorkforceWares'}?">
                    <set_value name="$TableRef" exact="$OwnerReports.{$Station}.{'$InsufficientWorkforceWares'}"/>
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$k">
                      <set_value name="$Ware" exact="$TableRefKeys.{$k}"/>
                      <set_value name="$ReportValue" exact="$TableRef.{$Ware}"/>
                      <set_value name="$AggregatedInsufficientWorkforceTable.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_if value="not $SectorInsufficientWorkforceTable.{$Sector}?">
                        <set_value name="$SectorInsufficientWorkforceTable.{$Sector}" exact="table[]"/>
                      </do_if>
                      <set_value name="$SectorInsufficientWorkforceTable.{$Sector}.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_while value="$InsufficientWorkforceTable.{$ReportValue}?">
                        <set_value name="$ReportValue" exact="1" operation="add"/>
                      </do_while>
                      <set_value name="$InsufficientWorkforceTable.{$ReportValue}" exact="table[{'$Station'} = $Station, {'$Ware'} = $Ware]"/>
                    </do_all>
                  </do_if>

                  <!--Workforce wares in short supply-->
                  <do_if value="$OwnerReports.{$Station}.{'$ShortageWorkforceWares'}?">
                    <set_value name="$TableRef" exact="$OwnerReports.{$Station}.{'$ShortageWorkforceWares'}"/>
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$k">
                      <set_value name="$Ware" exact="$TableRefKeys.{$k}"/>
                      <set_value name="$ReportValue" exact="$TableRef.{$Ware}"/>
                      <set_value name="$AggregatedShortageWorkforceTable.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_if value="not $SectorShortageWorkforceTable.{$Sector}?">
                        <set_value name="$SectorShortageWorkforceTable.{$Sector}" exact="table[]"/>
                      </do_if>
                      <set_value name="$SectorShortageWorkforceTable.{$Sector}.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_while value="$ShortageWorkforceTable.{$ReportValue}?">
                        <set_value name="$ReportValue" exact="1" operation="add"/>
                      </do_while>
                      <set_value name="$ShortageWorkforceTable.{$ReportValue}" exact="table[{'$Station'} = $Station, {'$Ware'} = $Ware]"/>
                    </do_all>
                  </do_if>

                  <!--Insufficient Build Wares-->
                  <do_if value="$OwnerReports.{$Station}.{'$InsufficientBuildWares'}?">
                    <set_value name="$TableRef" exact="$OwnerReports.{$Station}.{'$InsufficientBuildWares'}"/>
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$k">
                      <set_value name="$Ware" exact="$TableRefKeys.{$k}"/>
                      <!--treat insufficient build wares as higher priority?-->
                      <!--TODO @Owen move to params-->
                      <set_value name="$ReportValue" exact="$TableRef.{$Ware} * 2"/>
                      <set_value name="$AggregatedInsufficientBuildTable.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_if value="not $SectorInsufficientBuildTable.{$Sector}?">
                        <set_value name="$SectorInsufficientBuildTable.{$Sector}" exact="table[]"/>
                      </do_if>
                      <set_value name="$SectorInsufficientBuildTable.{$Sector}.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_while value="$InsufficientBuildTable.{$ReportValue}?">
                        <set_value name="$ReportValue" exact="1" operation="add"/>
                      </do_while>
                      <set_value name="$InsufficientBuildTable.{$ReportValue}" exact="table[{'$Station'} = $Station, {'$Ware'} = $Ware]"/>
                    </do_all>
                  </do_if>

                  <!--Build wares in short supply-->
                  <do_if value="$OwnerReports.{$Station}.{'$ShortageBuildWares'}?">
                    <set_value name="$TableRef" exact="$OwnerReports.{$Station}.{'$ShortageBuildWares'}"/>
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$k">
                      <set_value name="$Ware" exact="$TableRefKeys.{$k}"/>
                      <set_value name="$ReportValue" exact="$TableRef.{$Ware} * 1.5"/>
                      <set_value name="$AggregatedShortageBuildTable.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_if value="not $SectorShortageBuildTable.{$Sector}?">
                        <set_value name="$SectorShortageBuildTable.{$Sector}" exact="table[]"/>
                      </do_if>
                      <set_value name="$SectorShortageBuildTable.{$Sector}.{$Ware}" exact="$ReportValue" operation="add"/>
                      <do_while value="$ShortageBuildTable.{$ReportValue}?">
                        <set_value name="$ReportValue" exact="1" operation="add"/>
                      </do_while>
                      <set_value name="$ShortageBuildTable.{$ReportValue}" exact="table[{'$Station'} = $Station, {'$Ware'} = $Ware]"/>
                    </do_all>
                  </do_if>
                </do_all>

                <do_if value="$DebugChance == 100">
                  <debug_text text="'Insufficient production wares'" context="false"/>
                  <set_value name="$TableRef" exact="$AggregatedInsufficientProductsTable"/>
                  <include_actions ref="AggregatedReportTableHelper"/>

                  <debug_text text="'Production ware shortages'" context="false"/>
                  <set_value name="$TableRef" exact="$AggregatedShortageProductsTable"/>
                  <include_actions ref="AggregatedReportTableHelper"/>

                  <debug_text text="'Insufficient workforce res.'" context="false"/>
                  <set_value name="$TableRef" exact="$AggregatedInsufficientWorkforceTable"/>
                  <include_actions ref="AggregatedReportTableHelper"/>

                  <debug_text text="'Workforce ware shortages'" context="false"/>
                  <set_value name="$TableRef" exact="$AggregatedShortageWorkforceTable"/>
                  <include_actions ref="AggregatedReportTableHelper"/>

                  <debug_text text="'Insufficient build res.'" context="false"/>
                  <set_value name="$TableRef" exact="$AggregatedInsufficientBuildTable"/>
                  <include_actions ref="AggregatedReportTableHelper"/>

                  <debug_text text="'Build ware shortages'" context="false"/>
                  <set_value name="$TableRef" exact="$AggregatedShortageBuildTable"/>
                  <include_actions ref="AggregatedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$InsufficientProductsTable"/>
                  <debug_text text="'Worst insufficient production ware reports (of ' + $TableRef.keys.count + ')'" context="false"/>
                  <set_value name="$DebugReportType" exact="'insufficient'"/>
                  <include_actions ref="SortedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$ShortageProductsTable"/>
                  <debug_text text="'Worst production ware shortage reports (of ' + $TableRef.keys.count + ')'" context="false"/>
                  <set_value name="$DebugReportType" exact="'short'"/>
                  <include_actions ref="SortedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$InsufficientWorkforceTable"/>
                  <debug_text text="'Worst insufficient workforce ware reports (of ' + $TableRef.keys.count + ')'" context="false"/>
                  <set_value name="$DebugReportType" exact="'insufficient'"/>
                  <include_actions ref="SortedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$ShortageWorkforceTable"/>
                  <debug_text text="'Worst workforce ware shortage reports (of ' + $TableRef.keys.count + ')'" context="false"/>
                  <set_value name="$DebugReportType" exact="'short'"/>
                  <include_actions ref="SortedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$InsufficientBuildTable"/>
                  <debug_text text="'Worst insufficient build ware reports (of ' + $TableRef.keys.count + ')'" context="false"/>
                  <set_value name="$DebugReportType" exact="'insufficient'"/>
                  <include_actions ref="SortedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$ShortageBuildTable"/>
                  <debug_text text="'Worst build ware shortage reports (of ' + $TableRef.keys.count + ')'" context="false"/>
                  <set_value name="$DebugReportType" exact="'short'"/>
                  <include_actions ref="SortedReportTableHelper"/>

                  <set_value name="$TableRef" exact="$SectorInsufficientProductsTable"/>
                  <debug_text text="'Aggregated insufficient production ware reports by sector'" context="false"/>
                  <set_value name="$DebugReportType" exact="'insufficient'"/>
                  <include_actions ref="SectorReportTableHelper"/>

                  <set_value name="$TableRef" exact="$SectorShortageProductsTable"/>
                  <debug_text text="'Aggregated production ware shortage reports by sector'" context="false"/>
                  <set_value name="$DebugReportType" exact="'shortage'"/>
                  <include_actions ref="SectorReportTableHelper"/>

                  <set_value name="$TableRef" exact="$SectorInsufficientWorkforceTable"/>
                  <debug_text text="'Aggregated insufficient workforce ware reports by sector'" context="false"/>
                  <set_value name="$DebugReportType" exact="'insufficient'"/>
                  <include_actions ref="SectorReportTableHelper"/>

                  <set_value name="$TableRef" exact="$SectorShortageWorkforceTable"/>
                  <debug_text text="'Aggregated workforce ware shortage reports by sector'" context="false"/>
                  <set_value name="$DebugReportType" exact="'shortage'"/>
                  <include_actions ref="SectorReportTableHelper"/>

                  <set_value name="$TableRef" exact="$SectorInsufficientBuildTable"/>
                  <debug_text text="'Aggregated insufficient build ware reports by sector'" context="false"/>
                  <set_value name="$DebugReportType" exact="'insufficient'"/>
                  <include_actions ref="SectorReportTableHelper"/>

                  <set_value name="$TableRef" exact="$SectorShortageBuildTable"/>
                  <debug_text text="'Aggregated build ware shortage reports by sector'" context="false"/>
                  <set_value name="$DebugReportType" exact="'shortage'"/>
                  <include_actions ref="SectorReportTableHelper"/>
                </do_if>

                <!--Decide which reports to act on-->
                <!--TODO @Owen - move to parameters.xml-->
                <set_value name="$ActionThresholds" exact="table[]"/>
                <set_value name="$ActionThresholds.{'$request_commandeerable_freighter'}" exact="3000"/>
                <set_value name="$ActionThresholds.{'$request_freighter'}"                exact="6000"/>
                <set_value name="$ActionThresholds.{'$request_priority_freighter'}"       exact="11000"/>
                <set_value name="$ActionThresholds.{'$request_production'}"               exact="35000"/>
                <set_value name="$ActionThresholds.{'$request_factory'}"                  exact="65000"/>
                <set_value name="$ActionThresholds.{'$not_viable'}"                       exact="90000"/>
                <set_value name="$ActionThresholdsKeys" exact="$ActionThresholds.keys.sorted"/>

                <set_value name="$InsufficientNeighbourMultiplier" exact="0.2" comment="Factor of which to take neighbouring insufficient resources into account"/>
                <set_value name="$NeighbourActionMultiplier" exact="0.5" comment="Factor of which to take the action score of neighbouring sectors for this ware into account"/>

                <set_value name="$Request_Commandeerable_Freighter_Release_Time" exact="5400s" comment="Time after which the ship will be released"/>

                <set_value name="$Request_Freighter_Spawn_Wait_Time" exact="1000s" comment="Time to allow the freighter to start being placed in a shipyard"/>
                <set_value name="$Request_Freighter_Build_Wait_Time" exact="1000s" comment="Time to allow the freighter to be built by the shipyard after spawning"/>

                <set_value name="$Request_Pri_Freighter_Spawn_Wait_Time" exact="1500s" comment="Time to allow the freighter to start being placed in a shipyard"/>
                <set_value name="$Request_Pri_Freighter_Build_Wait_Time" exact="1500s" comment="Time to allow the freighter to be built by the shipyard after spawning"/>

                <set_value name="$Request_Production_Build_Wait_Time" exact="5h" comment="Time to allow the building to start"/>
                <set_value name="$Request_Production_Build_Timeout"   exact="5h" comment="Time to allow the build to progress before disregarding"/>
                <set_value name="$Request_Production_Working_Timeout" exact="5h" comment="Time to allow the factory to work before disregarding"/>

                <set_value name="$Request_Factory_Build_Wait_Time" exact="15h" comment="Time to allow the building to start, where any module is operational or buildmodule is building"/>
                <set_value name="$Request_Factory_Build_Timeout"   exact="10h" comment="Time to allow the build to progress before disregarding"/>
                <set_value name="$Request_Factory_Working_Timeout" exact="5h" comment="Time to allow the factory to work before disregarding"/>

                <!--Check the exising actions to see if any should be disregarded-->
                <set_value name="$DisregardedActions" exact="[]"/>
                <set_value name="$ActionReportKeys" exact="$ActionReports.keys.list"/>
                <do_all exact="$ActionReportKeys.count" counter="$ARK_i">
                  <set_value name="$ActionReportList" exact="$ActionReports.{$ActionReportKeys.{$ARK_i}}"/>
                  <do_all exact="$ActionReportList.count" counter="$ARL_i" reverse="true">
                    <set_value name="$DisregardAction" exact="false"/>
                    <set_value name="$DisregardReason" exact="'UNKNOWN'" chance="$DebugChance"/>
                    <set_value name="$DisregardObject" exact="null"/>

                    <set_value name="$ActionReport" exact="$ActionReportList.{$ARL_i}"/>
                    <set_value name="$ActionReportDef" exact="$ActionReport.$ActionDef"/>

                    <!--CHECK REQUEST_COMMANDEERABLE_FRIEGHTER ACTION-->
                    <do_if value="$ActionReportDef.$Type == '$request_commandeerable_freighter'">
                      <set_value name="$CommandeeredShip" exact="$ActionReportDef.$Ship"/>
                      <do_if value="$CommandeeredShip.isoperational and $CommandeeredShip.isjobship and not @$ActionReportDef.$Disregard" comment="$ActionReportDef.$Disregard can be set in the action handler itself">
                        <!--Ship is still an existing job ship-->
                        <do_if value="player.age ge $ActionReportDef.$CommandeerTime + $Request_Commandeerable_Freighter_Release_Time">
                          <!--Ship is no longer a requested ship. Disregard action report-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Ship is to be released as a commandeered freighter'" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$CommandeeredShip"/>
                        </do_if>
                      </do_if>
                      <do_else>
                        <!--Ship is no longer a requested ship. Disregard action report-->
                        <set_value name="$DisregardAction" exact="true"/>
                        <set_value name="$DisregardReason" exact="'Ship is no longer a suitable job ship'" chance="$DebugChance"/>
                        <set_value name="$DisregardObject" exact="$CommandeeredShip"/>
                      </do_else>
                      <remove_value name="$CommandeeredShip"/>
                    </do_if>

                    <!--CHECK REQUEST_FREIGHTER ACTION-->
                    <do_elseif value="$ActionReportDef.$Type == '$request_freighter'">
                      <set_value name="$RequestedShip" exact="$ActionReportDef.$Ship"/>
                      <do_if value="($RequestedShip.exists or $RequestedShip.isoperational) and $RequestedShip.isrequestedjobship">
                        <!--Ship is still an existing requested job ship or is an operational ship waiting to be built somewhere-->
                        <!--TODO @Owen - parameters for things such as how long to wait for requested ships-->
                        <do_if value="not $RequestedShip.exists">
                          <do_if value="$ActionReport.$StartTime lt player.age - $Request_Freighter_Spawn_Wait_Time">
                            <!--DISREGARD-->
                            <!--However, the ship still does not exist and it was requested some time ago. Kill and try something else-->
                            <destroy_object object="$RequestedShip"/>
                            <set_value name="$DisregardAction" exact="true"/>
                            <set_value name="$DisregardReason" exact="'Time elapsed and it never existed'" chance="$DebugChance"/>
                          </do_if>
                        </do_if>
                        <do_elseif value="$RequestedShip.isoperational">
                          <!--TODO @Owen, check if actually doing something. Any trade runs?-->
                          <!--<do_elseif value="$ActionReportDef.$LaunchTime lt xxxxs and the situation is around the same or worse">
                          try another frieghter or a more drastic measure?
                          </do_elseif>-->
                        </do_elseif>
                        <do_elseif value="$RequestedShip.isconstruction">
                          <do_if value="@$ActionReportDef.$SpawnTime lt player.age - $Request_Freighter_Build_Wait_Time">
                            <!--DISREGARD-->
                            <!--Ship has not been built yet-->
                            <!--TODO @Owen. Check state of the build. Is it close to finishing? Allow a bit more time?-->
                            <!--TODO @Owen Recycle-->
                            <destroy_object object="$RequestedShip"/>
                            <set_value name="$DisregardAction" exact="true"/>
                            <set_value name="$DisregardReason" exact="'Ship took too long to finish building'" chance="$DebugChance"/>
                          </do_if>
                        </do_elseif>
                        <do_elseif value="$RequestedShip.iswreck">
                          <!--DISREGARD-->
                          <!--Requested job ship is destroyed-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Ship is destroyed.'" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$RequestedShip"/>
                        </do_elseif>
                      </do_if>
                      <do_else>
                        <!--Ship is no longer a requested ship. Disregard action report-->
                        <set_value name="$DisregardAction" exact="true"/>
                        <set_value name="$DisregardReason" exact="'Ship is no longer a requested job ship'" chance="$DebugChance"/>
                        <set_value name="$DisregardObject" exact="$RequestedShip"/>
                      </do_else>
                      <remove_value name="$RequestedShip"/>
                    </do_elseif>

                    <!--CHECK REQUEST_PRIORITY_FRIEGHTER ACTION-->
                    <do_elseif value="$ActionReportDef.$Type == '$request_priority_freighter'">
                      <set_value name="$RequestedShip" exact="$ActionReportDef.$Ship"/>
                      <do_if value="($RequestedShip.exists or $RequestedShip.isoperational) and $RequestedShip.isrequestedjobship">
                        <!--Ship is still an existing requested job ship or is an operational ship waiting to be built somewhere-->
                        <!--TODO @Owen - parameters for things such as how long to wait for requested ships-->
                        <do_if value="not $RequestedShip.exists">
                          <do_if value="$ActionReport.$StartTime lt player.age - $Request_Pri_Freighter_Spawn_Wait_Time">
                            <!--DISREGARD-->
                            <!--However, the ship still does not exist and it was requested some time ago. Kill and try something else-->
                            <destroy_object object="$RequestedShip"/>
                            <set_value name="$DisregardAction" exact="true"/>
                            <set_value name="$DisregardReason" exact="'Time elapsed and it never existed'" chance="$DebugChance"/>
                          </do_if>
                        </do_if>
                        <do_elseif value="$RequestedShip.isoperational">
                          <!--TODO @Owen, check if actually doing something. Any trade runs?-->
                          <!--<do_elseif value="$ActionReportDef.$LaunchTime lt xxxxs and the situation is around the same or worse">
                          try another frieghter or a more drastic measure?
                          </do_elseif>-->
                        </do_elseif>
                        <do_elseif value="$RequestedShip.isconstruction">
                          <do_if value="@$ActionReportDef.$SpawnTime lt player.age - $Request_Pri_Freighter_Build_Wait_Time">
                            <!--DISREGARD-->
                            <!--Ship has not been built yet-->
                            <!--TODO @Owen. Check state of the build. Is it close to finishing? Allow a bit more time?-->
                            <!--TODO @Owen Recycle-->
                            <destroy_object object="$RequestedShip"/>
                            <set_value name="$DisregardAction" exact="true"/>
                            <set_value name="$DisregardReason" exact="'Ship took too long to finish building'" chance="$DebugChance"/>
                          </do_if>
                        </do_elseif>
                        <do_elseif value="$RequestedShip.iswreck">
                          <!--DISREGARD-->
                          <!--Requested job ship is destroyed-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Ship is destroyed.'" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$RequestedShip"/>
                        </do_elseif>
                      </do_if>
                      <do_else>
                        <set_value name="$DisregardAction" exact="true"/>
                        <set_value name="$DisregardReason" exact="'Ship is no longer a requested job ship'" chance="$DebugChance"/>
                        <set_value name="$DisregardObject" exact="$RequestedShip"/>
                      </do_else>
                      <remove_value name="$RequestedShip"/>
                    </do_elseif>

                    <!--CHECK REQUEST_PRODUCTION ACTION-->
                    <do_elseif value="$ActionReportDef.$Type == '$request_production'">
                      <set_value name="$Station" exact="$ActionReportDef.$Station"/>
                      <do_if value="not $Station.exists">
                        <!--DISREGARD-->
                        <!--The station no longer exists-->
                        <set_value name="$DisregardAction" exact="true"/>
                        <set_value name="$DisregardReason" exact="'Station no longer exists'" chance="$DebugChance"/>
                      </do_if>
                      <do_elseif value="@$ActionReportDef.$BuiltTime">
                        <!--All productions were finished-->
                        <!--TODO @Owen check if the factory is actually producing?-->
                        <do_if value="$ActionReportDef.$BuiltTime lt player.age - $Request_Production_Working_Timeout">
                          <!--DISREGARD-->
                          <!--Productions have been complete for some time.-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Factory has had the new productions for ' + $Request_Production_Working_Timeout" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$Station"/>
                        </do_if>
                      </do_elseif>
                      <do_elseif value="@$ActionReportDef.$StartBuildTime or @$ActionReportDef.$LastBuildTime">
                        <!--Some module has begun construction-->
                        <do_if value="[$ActionReportDef.$StartBuildTime, @$ActionReportDef.$LastBuildTime].max lt player.age - $Request_Production_Build_Timeout">
                          <!--DISREGARD-->
                          <!--Factory has been expanding for a long time.-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Factory has been expanding for ' + $Request_Production_Build_Timeout" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$Station"/>
                        </do_if>
                      </do_elseif>
                      <do_else>
                        <!--Building has not started yet-->
                        <do_if value="$ActionReport.$StartTime lt player.age - $Request_Production_Build_Wait_Time">
                          <!--DISREGARD-->
                          <!--Construction has not started on the factory for a long time.-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Expansion has not started on factory for' + $Request_Production_Build_Wait_Time" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$Station"/>
                        </do_if>
                      </do_else>
                      <remove_value name="$Station"/>
                    </do_elseif>

                    <!--CHECK REQUEST_FACTORY ACTION-->
                    <do_elseif value="$ActionReportDef.$Type == '$request_factory'">
                      <set_value name="$Station" exact="$ActionReportDef.$Station"/>
                      <do_if value="not $Station.exists">
                        <!--DISREGARD-->
                        <!--The module did exist, but no longer-->
                        <set_value name="$DisregardAction" exact="true"/>
                        <set_value name="$DisregardReason" exact="'Station no longer exists'" chance="$DebugChance"/>
                      </do_if>
                      <do_elseif value="@$ActionReportDef.$BuiltTime">
                        <!--Build has finished-->
                        <!--TODO @Owen check if the factory is actually producing?-->
                        <do_if value="$ActionReportDef.$BuiltTime lt player.age - $Request_Factory_Working_Timeout">
                          <!--DISREGARD-->
                          <!--Factory has been complete for some time.-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Factory has been working for ' + $Request_Factory_Working_Timeout" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$Station"/>
                        </do_if>
                      </do_elseif>
                      <do_elseif value="@$ActionReportDef.$StartBuildTime">
                        <!--Build has started-->
                        <do_if value="$ActionReportDef.$StartBuildTime lt player.age - $Request_Factory_Build_Timeout">
                          <!--DISREGARD-->
                          <!--Factory has been building for a long time.-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Factory has been building for ' + $Request_Factory_Build_Timeout" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$Station"/>
                        </do_if>
                      </do_elseif>
                      <do_else>
                        <!--Building has not started yet-->
                        <do_if value="$ActionReport.$StartTime lt player.age - $Request_Factory_Build_Wait_Time">
                          <!--DISREGARD-->
                          <!--Construction has not started on the factory for a long time.-->
                          <set_value name="$DisregardAction" exact="true"/>
                          <set_value name="$DisregardReason" exact="'Construction has not started on factory for' + $Request_Factory_Build_Timeout" chance="$DebugChance"/>
                          <set_value name="$DisregardObject" exact="$Station"/>
                        </do_if>
                      </do_else>
                      <remove_value name="$Station"/>
                    </do_elseif>
                    <do_else>
                      <assert value="false" text="'Unknown action type ' + $ActionReportDef.$Type + ' [Owen]'" break="1"/>
                    </do_else>

                    <do_if value="$DisregardAction">
                      <debug_text text="'Disregarding action with reason: ' + $DisregardReason + ' Action: ' + $ActionReport" context="false" chance="$DebugChance"/>
                      <do_if value="$DisregardObject and $DisregardObject.isclass.component">
                        <!--.isclass.component check as $DisregardObject may be disconnected and .exists may not work-->
                        <signal_objects object="$DisregardObject" param="'factionlogic_econ_disregard'" param2="$ActionReportDef.$Type"/>
                      </do_if>
                      <append_to_list name="$DisregardedActions" exact="$ActionReportList.{$ARL_i}"/>
                      <remove_value name="$ActionReportList.{$ARL_i}"/>
                    </do_if>
                  </do_all>
                </do_all>
                <remove_value name="$ActionReportKeys"/>

                <!--First, check the insufficient production resources-->
                <!--TODO @Owen - deal with ware shortage tables-->
                <set_value name="$ReportTablesToProcess" exact="[$SectorInsufficientProductsTable, $SectorInsufficientWorkforceTable, $SectorInsufficientBuildTable]"/>
                <do_all exact="$ReportTablesToProcess.count" counter="$h">
                  <set_value name="$TableRef" exact="$ReportTablesToProcess.{$h}"/>
                  <!--TableRef keys are sectors-->
                  <do_if value="$TableRef.keys.count">
                    <set_value name="$TableRefKeys" exact="$TableRef.keys.list"/>
                    <do_all exact="$TableRefKeys.count" counter="$i">
                      <set_value name="$Sector" exact="$TableRefKeys.{$i}"/>
                      <debug_text text="'\n' + $DebugText + 'Checking sector ' + $Sector + ' ' + $Sector.knownname" context="false" chance="$DebugChance"/>
                      <set_value name="$SubTable" exact="$TableRef.{$Sector}"/>
                      <set_value name="$SubTableRefKeys" exact="$SubTable.keys.list"/>
                      <do_all exact="$SubTableRefKeys.count" counter="$k" reverse="true">
                        <set_value name="$Ware" exact="$SubTableRefKeys.{$k}"/>
                        <set_value name="$SectorValue" exact="$SubTable.{$SubTableRefKeys.{$k}}"/>
                        <debug_text text="'Sector ' + $Sector + ' ' + $Sector.knownname + ' has insufficient ware ' + $Ware + ' at value ' + $SectorValue" context="false" chance="$DebugChance"/>

                        <do_if value="$SectorNeighbourTable.{$Sector}?">
                          <set_value name="$NeighbouringSectors" exact="$SectorNeighbourTable.{$Sector}"/>
                        </do_if>
                        <do_else>
                          <!--TODO @Owen decypher the comment below-->
                          <!--TODO @Owen This sector does is not owned by this faction but has stations reporting about wares-->
                          <set_value name="$NeighbouringSectors" exact="[$Sector]"/>
                        </do_else>

                        <!--Check if the neighboring sectors have reports for the same ware. Take them into account but with the $InsufficientNeighbourMultiplier-->
                        <!--TODO @Owen - only if positive?-->
                        <do_all exact="$NeighbouringSectors.count" counter="$sector_i">
                          <set_value name="$NeighbourSector" exact="$NeighbouringSectors.{$sector_i}"/>
                          <do_if value="$NeighbourSector != $Sector and $TableRef.{$NeighbourSector}?">
                            <set_value name="$NeighbourSubTable" exact="$TableRef.{$NeighbourSector}"/>
                            <do_if value="$NeighbourSubTable.{$Ware}?">
                              <set_value name="$SectorValue" exact="$NeighbourSubTable.{$Ware} * $InsufficientNeighbourMultiplier" operation="add"/>
                              <debug_text text="'Neighbouring sector ' + $NeighbourSector + ' ' + $NeighbourSector.knownname + ' also has insufficient ware ' + $Ware + ' to add modified value ' + $NeighbourSubTable.{$Ware} * $InsufficientNeighbourMultiplier + ' for a new value of ' + $SectorValue" context="false" chance="$DebugChance"/>
                            </do_if>
                          </do_if>
                        </do_all>

                        <set_value name="$HighestActionCost" exact="0"/>
                        <set_value name="$HighestDisregardedActionCost" exact="0"/>
                        <do_all exact="$DisregardedActions.count" counter="$o">
                          <do_if value="$DisregardedActions.{$o}.$Sector and $DisregardedActions.{$o}.$Ware == $Ware">
                            <do_if value="$ActionThresholds.{$ActionReportDef.{'$Type'}} gt $HighestDisregardedActionCost">
                              <!--This was a disregarded action for this sector, remember how much worth it had so an action of higher worth can be queued-->
                              <set_value name="$HighestDisregardedActionCost" exact="$ActionThresholds.{$ActionReportDef.$Type}"/>
                              <debug_text text="'Disregarded action had the highest cost so far of ' + $HighestDisregardedActionCost" context="false" chance="$DebugChance"/>
                            </do_if>
                          </do_if>
                        </do_all>

Last edited by soundslikerust on Wed, 5. Dec 18, 22:24, edited 3 times in total.
Socratatus
Posts: 1626
Joined: Tue, 11. May 04, 15:34
x4

Re: [INFO] To all people reading that economy is false - it's not

Post by Socratatus »

I pay little attention to random claims from people until they prove it with facts. Much of it is simply people not giving the game time and just making wild assumptions before they even really know. However, your evidence helps.
1. Please do more on NPC civilian/uniform variety, and bio customisations, Devs.
2. Stations need sirens/warnings when enemy is close in numbers or Station in danger of destruction (in Sandbox).
Yes, for immersion. Thankyou ahead of time. (Edit: This is actually happening!!!)

"No problem can withstand the assault of sustained thinking."
"Before acting 'out of the box', consider why the box was there in the first place."
rrohde
Posts: 56
Joined: Tue, 8. Dec 09, 04:18
x4

Re: [INFO] To all people reading that economy is false - it's not

Post by rrohde »

Socratatus wrote: Wed, 5. Dec 18, 21:54 I pay little attention to random claims from people until they prove it with facts. Much of it is simply people not giving the game time and just making wild assumptions before they even really know. However, your evidence helps.
+1
PC: Intel Core i7-7700K 4.2GHz @ 5.1GHz | MSI GTX 1080 TI | ASUS Maximus IX Hero | 32GB DDR4 RAM | 512GB Samsung 850 PRO SSD | Win10 Pro 64bit | Oculus Rift CV1 | Jetseat 908 | Monstertech MTX Sim Rig | VKB Gunfighter Pro Mk.II w/ MCG PRO
soundslikerust
Posts: 42
Joined: Mon, 5. Jan 15, 05:43
x3ap

Re: [INFO] To all people reading that economy is fake - it's not

Post by soundslikerust »

I'm reading through code in my spare time (scripts are about 200 000 lines of code and there is probably a milion lines of different kinds of code to read and analyse everywhere).
And I have to say it's not bad, it's looking good and legit. Something can be turned off or not working but IT"S THERE and looks quite good
User avatar
StoneLegionYT
Posts: 1478
Joined: Fri, 4. Nov 05, 01:18
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by StoneLegionYT »

If people played they know it was not faked. Sure some area's it cheats but it's not fake. This why were having a big issue looked by the devs. Lot of people games have no war / death happening. So the economy is stalling out and nothing new is being done.
soundslikerust
Posts: 42
Joined: Mon, 5. Jan 15, 05:43
x3ap

Re: [INFO] To all people reading that economy is fake - it's not

Post by soundslikerust »

Kane Hart wrote: Wed, 5. Dec 18, 22:01 If people played they know it was not faked. Sure some area's it cheats but it's not fake. This why were having a big issue looked by the devs. Lot of people games have no war / death happening. So the economy is stalling out and nothing new is being done.
I have to say i was thinking it was cheating but after looking at Faction Managers logic making goals and sub goals for different factions, planning invasions, reacting, making reconnaissance!, planning staging areas, planning building stations and much more. I have to give it back to Egosoft. I think it's not even cheating, it can be tuned to not be as invasive for the player but it should be like that. If not it would kill a game
Last edited by soundslikerust on Wed, 5. Dec 18, 22:10, edited 2 times in total.
User avatar
StoneLegionYT
Posts: 1478
Joined: Fri, 4. Nov 05, 01:18
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by StoneLegionYT »

soundslikerust wrote: Wed, 5. Dec 18, 22:06
Kane Hart wrote: Wed, 5. Dec 18, 22:01 If people played they know it was not faked. Sure some area's it cheats but it's not fake. This why were having a big issue looked by the devs. Lot of people games have no war / death happening. So the economy is stalling out and nothing new is being done.
I have to say i was thinking it was cheating but after looking at Faction Managers logic making goals and sub goals for different factions, planning invasions, reacting, planning staging areas, planning building stations and much more. I have to give it back to Egosoft. I thing it's not even cheating, it can be tuned to not be as invasive for the player but it should be
When I say cheating at times I mean something like there might be one faction spawns a few ships maybe like pirates, etc. But the developers wanted to create the most simulated X Game to date. This been done in X-Rebirth via mod it was very taxing it's one the reasons our games are so heavy on CPU is that it adds a lot more taxation to the game.
respaekt
Posts: 35
Joined: Wed, 10. Jun 09, 09:55

Re: [INFO] To all people reading that economy is fake - it's not

Post by respaekt »

A lot of people are maybe a little bit disappointed that, on first glance, the economy seems very small and not much is really going on. Thats why they responsive for such alligations...?!

Sectors like Argon Prime are almost empty, just a few ships fliying around and delivering cargo. I have 40 autotraders and i earn around 500k per hour, thats not much, they often transport 100 Energy cells or other very small amounts of cargo....

I guess the game is not finished, the base is solid and makes much fun, seems content and balace are missing.

I have to add: For 50$ i would like have a little bit more, Split and Boron should be not a DLC, that includes a bigger universe and bugfixes. But i thrust egosoft, they will make the game as we want it
SteveMill
Posts: 3952
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by SteveMill »

I’m not interested in how it’s implemented, I’m only interested in whether it creates good gameplay.
CaptainX4
Posts: 491
Joined: Tue, 4. Dec 18, 16:54

Re: [INFO] To all people reading that economy is fake - it's not

Post by CaptainX4 »

well, then it cheats a lot and it definitely cheats the most around the player. the claims in that post have valid base. just look at these pictures:
Spoiler
Show
Image and Image
.
The game is clearly running around the player, you might just havent found that script yet... It might have the base of a simulated economy but it certainly not running based on that.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by BlackRain »

CaptainX4 wrote: Wed, 5. Dec 18, 22:55 well, then it cheats a lot and it definitely cheats the most around the player. the claims in that post have valid base. just look at these pictures:
Spoiler
Show
Image and Image
.
The game is clearly running around the player, you might just havent found that script yet... It might have the base of a simulated economy but it certainly not running based on that.
The economy is real and does not revolve around the player. Of course the player affects things by their actions but everything moves with or without u too
soundslikerust
Posts: 42
Joined: Mon, 5. Jan 15, 05:43
x3ap

Re: [INFO] To all people reading that economy is fake - it's not

Post by soundslikerust »

respaekt wrote: Wed, 5. Dec 18, 22:41 A lot of people are maybe a little bit disappointed that, on first glance, the economy seems very small and not much is really going on. Thats why they responsive for such alligations...?!

Sectors like Argon Prime are almost empty, just a few ships fliying around and delivering cargo. I have 40 autotraders and i earn around 500k per hour, thats not much, they often transport 100 Energy cells or other very small amounts of cargo....

I guess the game is not finished, the base is solid and makes much fun, seems content and balace are missing.

I have to add: For 50$ i would like have a little bit more, Split and Boron should be not a DLC, that includes a bigger universe and bugfixes. But i thrust egosoft, they will make the game as we want it
This happens quite often when you try to simulate some systems. It's hard to predict what will happen. Much better results are when you micromanage and hard code state machines and spawn everything and everywhere on demand. I'm not worried about this. It just have to be analysed ( simulations are horribly hard to analyse and debug because of logical bugs).

Fun fact - users most often evaluate hard coded cheating AI much better . There are tons of anecdotes about this in programming industry. Sometimes it is not worth trying to be smart
Last edited by soundslikerust on Wed, 5. Dec 18, 23:43, edited 1 time in total.
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Re: [INFO] To all people reading that economy is fake - it's not

Post by Killjaeden »

It's a possibility (technically, now idea if they use it) that instead of having every ware moved by actual ship that they "approximate" a % wares being moved. Instead of 2 real freighters moving, they simulate only half and double his "effect" for example.
Also they could virtualize ship traffic - "blending out" the actual ships and just have them be there as data: Shiptype, Start point, End point, Start time, End time (guessed), wares, other stuff. Once a player comes somewhere in the general area they "forge" a real ship out of the data by interpolating where it should be according to time.

Plus they still may employ "window dressing" i.e. ships that spawn just to suggest more life in a universe than there actually is. Civilians but also fake traders. This subset could have no impact on the universe (e.g. miners that mine when the player looks but dont sell wares and just dissappear if the player lets them out their sight)

Technically all those techniques still simulate an economy. It may just not be simulated in a way most players would have thought or imagined it...

Dont have X4 yet (need pc upgrade first), but with the distances in the game growing by a gigantic factor compared to X2 and X3 it would surprise me if they wouldnt use window dresser ships (in addition to the real simulated parts). More space -> less object density -> additional objects required to make it less boring. In XTC mod for X3TC we also increased Sector size from maybe 60km vanilla average to >100km average. Result was everything felt boring and empty after a while. After the initial start everything was filled and lively. After several hours ships distributed themself more evenly -> most sectors felt empty, most encounters where with "window dressers". Made my own personal modification to make sectors smaller and more cozy again -> much nicer experience. Lesson learned - bigger space is not always better.
Based on the comments, i feel like that's the exact same thing that is happening here. Symptoms are pretty much identical.
Last edited by Killjaeden on Wed, 5. Dec 18, 23:53, edited 3 times in total.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
soundslikerust
Posts: 42
Joined: Mon, 5. Jan 15, 05:43
x3ap

Re: [INFO] To all people reading that economy is fake - it's not

Post by soundslikerust »

Killjaeden wrote: Wed, 5. Dec 18, 23:40 It's a possibility (technically, now idea if they use it) that instead of having every ware moved by actual ship that they "approximate" a % wares being moved. Instead of 2 real freighters moving, they simulate only half and double his "effect" for example.
Also they could virtualize ship traffic - "blending out" the actual ships and just have them be there as data: Shiptype, Start point, End point, Start time, End time (guessed), wares, other stuff. Once a player comes somewhere in the general area they "forge" a real ship out of the data by interpolating where it should be according to time.

Plus they still may employ "window dressing" i.e. ships that spawn just to suggest more life in a universe than there actually is. Civilians but also fake traders. This subset could have no impact on the universe (e.g. miners that mine when the player looks but dont sell wares and just dissappear if the player lets them out their sight)

Technically all those techniques still simulate an economy. It may just not be simulated in a way most players would have thought or imagined it...
Good point. It's very possible but that's only transport not the economy of production, supply and demand. Graphical representation of ships moving wares. Of course there are more like sinks which have to empty produced wares to make demand (it's in the code)

There is system which decides what has to be produced, when and what is in too small numbers. Then game checks where to produce it. And when there is no station to produce it because it was destroyed faction manager makes plans for building station or invasion if it lost territory. I still didn't see it in a game yet :(
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Re: [INFO] To all people reading that economy is fake - it's not

Post by Killjaeden »

soundslikerust wrote: Wed, 5. Dec 18, 23:46 Good point. It's very possible but that's only transport not the economy of production, supply and demand. Graphical representation of ships moving wares. Of course there are more like sinks which have to empty produced wares to make demand (it's in the code)

There is system which decides what has to be produced, when and what is in too small numbers. Then game checks where to produce it. And when there is no station to produce it because it was destroyed faction manager makes plans for building station or invasion if it lost territory. I still didn't see it in a game yet :(
Faction development is an extremely slow process - ware transfer is slow, especially if it relies on "freelance" pilots that are attracted by automatic ware pricing schemes. Rebalancing of economy situations this way is extremely slow. If you adjust the "knobs" too quickly on a system that reacts very slow in nature you run the risk of increasing the instability instead of helping to reduce it, esp. when it's an automated system without human overseer. Thats a general thing, it would apply to any similar game. To see the results of the actions you would propably need the debug output to see what actions are done actually, as you would simply miss them due to the little changes and slow reaction speeds. Except for military warfare - there i feel a "command algorithm" would have to react much quicker to changes to be of any use.
Last edited by Killjaeden on Thu, 6. Dec 18, 00:04, edited 3 times in total.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by BlackRain »

I have already explained this but all ships are built, with a couple exceptions. The factions without shipyards, meaning Khaak and some pirates are spawned. Also the fluff fake ships, meaning mass transit. Every other ship in the game is built and has a purpose. The economy is also completely real with no cheating. At gamestart is the only time that stations, ships and wares are spawned into the game, this is the start. After, every ore/gas must be mined and every ware produced and moved. There is faction logic to handle the economy and expansion and other things as well. Whether it is working correctly or how deep this faction logic goes is something to explore though.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by BlackRain »

Killjaeden wrote: Thu, 6. Dec 18, 00:00
soundslikerust wrote: Wed, 5. Dec 18, 23:46 Good point. It's very possible but that's only transport not the economy of production, supply and demand. Graphical representation of ships moving wares. Of course there are more like sinks which have to empty produced wares to make demand (it's in the code)

There is system which decides what has to be produced, when and what is in too small numbers. Then game checks where to produce it. And when there is no station to produce it because it was destroyed faction manager makes plans for building station or invasion if it lost territory. I still didn't see it in a game yet :(
Faction development is an extremely slow process - ware transfer is slow, especially if it relies on "freelance" pilots that are attracted by automatic ware pricing schemes. Rebalancing of economy situations this way is extremely slow. If you adjust the "knobs" too quickly on a system that reacts very slow in nature you run the risk of increasing the instability instead of helping to reduce it, esp. when it's an automated system hand has no human overseer. Thats a general thing, it would apply to any similar game.
This isnt how the economy is working. They have coded a conpletely new way of handling the economy which is not like other X games. There are similarities of course but the all new faction logic is intriguing
kyoo
Posts: 350
Joined: Wed, 26. Jul 06, 10:54
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by kyoo »

yeah because if it was faked it might actually work right now :boron:
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Re: [INFO] To all people reading that economy is fake - it's not

Post by Killjaeden »

BlackRain wrote: Thu, 6. Dec 18, 00:04 This isnt how the economy is working. They have coded a conpletely new way of handling the economy which is not like other X games. There are similarities of course but the all new faction logic is intriguing
So the factions control all their ships directly or what do you mean? Otherwise there will still be large "input lag" before the system normalizes after a change. There may be intriguing logic, but how well it can deal with interference is still important factor. If the factions just account for themself and trade is still happening across factions there are intereferences already. Add the player. Add explosions. Suddenly the great logic that looks good on paper does barely manage to keep things afloat.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [INFO] To all people reading that economy is fake - it's not

Post by BlackRain »

Killjaeden wrote: Thu, 6. Dec 18, 00:11
BlackRain wrote: Thu, 6. Dec 18, 00:04 This isnt how the economy is working. They have coded a conpletely new way of handling the economy which is not like other X games. There are similarities of course but the all new faction logic is intriguing
So the factions control all their ships directly or what do you mean? Otherwise there will still be large "input lag" before the system normalizes after a change. There may be intriguing logic, but how well it can deal with interference is still important factor. If the factions just account for themself and trade is still happening across factions there are intereferences already. Add the player. Add explosions. Suddenly the great logic that looks good on paper does barely manage to keep things afloat.
I was talking specifically about the trading, it isnt just an issue of auto pricing/buying etc. The stations will send out requests and such when low on critical goods and pull in sellers so to speak and other things. What I’m saying is that it is more complex of a system than x3. I didnt mean the system couldnt get screwed up due to variables. Also, we dont know how bugs might be messing things up too. Oh and factions do all control their traders and such. They arent really like free pilots just randomly selling. There are even specific ships whose job is just to fill certain needs

Return to “X4: Foundations”