vor dem Start des Spieles soll lediglich via Autoitsript Script die Config geprüft werden ob die wichtigsten Parameter passen, da mit manchen Updates leider configs zurückgesetzt werden.
Beiträge von schlawiner
-
-
Hallo Freunde,
ich möchte hier eine Datei, vom Spielentwickler als .cfg datei hinterlegt (allerdings enthält die Datei eine XML Formatierung), bestimmte Werte prüfen und ggf. anpassen
XML
Alles anzeigen<?xml version="1.0"?> <MyConfigDedicated xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SessionSettings> <GameMode>Survival</GameMode> <InventorySizeMultiplier>3</InventorySizeMultiplier> <BlocksInventorySizeMultiplier>1</BlocksInventorySizeMultiplier> <AssemblerSpeedMultiplier>3</AssemblerSpeedMultiplier> <AssemblerEfficiencyMultiplier>3</AssemblerEfficiencyMultiplier> <RefinerySpeedMultiplier>3</RefinerySpeedMultiplier> <OnlineMode>PUBLIC</OnlineMode> <MaxPlayers>4</MaxPlayers> <MaxFloatingObjects>100</MaxFloatingObjects> <TotalBotLimit>32</TotalBotLimit> <MaxBackupSaves>5</MaxBackupSaves> <MaxGridSize>0</MaxGridSize> <MaxBlocksPerPlayer>0</MaxBlocksPerPlayer> <TotalPCU>100000</TotalPCU> <PiratePCU>50000</PiratePCU> <MaxFactionsCount>0</MaxFactionsCount> <BlockLimitsEnabled>GLOBALLY</BlockLimitsEnabled> <EnableRemoteBlockRemoval>true</EnableRemoteBlockRemoval> <EnvironmentHostility>SAFE</EnvironmentHostility> <AutoHealing>true</AutoHealing> <EnableCopyPaste>false</EnableCopyPaste> <WeaponsEnabled>true</WeaponsEnabled> <ShowPlayerNamesOnHud>true</ShowPlayerNamesOnHud> <ThrusterDamage>true</ThrusterDamage> <CargoShipsEnabled>true</CargoShipsEnabled> <EnableSpectator>false</EnableSpectator> <WorldSizeKm>0</WorldSizeKm> <RespawnShipDelete>false</RespawnShipDelete> <ResetOwnership>false</ResetOwnership> <WelderSpeedMultiplier>2</WelderSpeedMultiplier> <GrinderSpeedMultiplier>2</GrinderSpeedMultiplier> <RealisticSound>false</RealisticSound> <HackSpeedMultiplier>0.33</HackSpeedMultiplier> <PermanentDeath>false</PermanentDeath> <AutoSaveInMinutes>5</AutoSaveInMinutes> <EnableSaving>true</EnableSaving> <InfiniteAmmo>false</InfiniteAmmo> <EnableContainerDrops>true</EnableContainerDrops> <SpawnShipTimeMultiplier>0</SpawnShipTimeMultiplier> <ProceduralDensity>0.35</ProceduralDensity> <ProceduralSeed>0</ProceduralSeed> <DestructibleBlocks>true</DestructibleBlocks> <EnableIngameScripts>false</EnableIngameScripts> <ViewDistance>15000</ViewDistance> <EnableToolShake>true</EnableToolShake> <VoxelGeneratorVersion>4</VoxelGeneratorVersion> <EnableOxygen>true</EnableOxygen> <EnableOxygenPressurization>true</EnableOxygenPressurization> <Enable3rdPersonView>true</Enable3rdPersonView> <EnableEncounters>true</EnableEncounters> <EnableConvertToStation>true</EnableConvertToStation> <StationVoxelSupport>false</StationVoxelSupport> <EnableSunRotation>true</EnableSunRotation> <EnableRespawnShips>true</EnableRespawnShips> <ScenarioEditMode>false</ScenarioEditMode> <Scenario>false</Scenario> <UpdateRespawnDictionary>false</UpdateRespawnDictionary> <CanJoinRunning>false</CanJoinRunning> <PhysicsIterations>8</PhysicsIterations> <SunRotationIntervalMinutes>119.999992</SunRotationIntervalMinutes> <EnableJetpack>true</EnableJetpack> <SpawnWithTools>true</SpawnWithTools> <BlueprintShareTimeout>30</BlueprintShareTimeout> <BlueprintShare>true</BlueprintShare> <StartInRespawnScreen>false</StartInRespawnScreen> <EnableVoxelDestruction>true</EnableVoxelDestruction> <MaxDrones>5</MaxDrones> <EnableDrones>true</EnableDrones> <EnableWolfs>false</EnableWolfs> <EnableSpiders>false</EnableSpiders> <FloraDensityMultiplier>1</FloraDensityMultiplier> <EnableStructuralSimulation>false</EnableStructuralSimulation> <MaxActiveFracturePieces>50</MaxActiveFracturePieces> <BlockTypeLimits> <dictionary /> </BlockTypeLimits> <EnableScripterRole>false</EnableScripterRole> <MinDropContainerRespawnTime>5</MinDropContainerRespawnTime> <MaxDropContainerRespawnTime>20</MaxDropContainerRespawnTime> <EnableTurretsFriendlyFire>false</EnableTurretsFriendlyFire> <EnableSubgridDamage>false</EnableSubgridDamage> <SyncDistance>3000</SyncDistance> <ExperimentalMode>false</ExperimentalMode> <AdaptiveSimulationQuality>true</AdaptiveSimulationQuality> <EnableVoxelHand>true</EnableVoxelHand> <RemoveOldIdentitiesH>0</RemoveOldIdentitiesH> <TrashRemovalEnabled>true</TrashRemovalEnabled> <StopGridsPeriodMin>15</StopGridsPeriodMin> <TrashFlagsValue>7706</TrashFlagsValue> <AFKTimeountMin>0</AFKTimeountMin> <BlockCountThreshold>20</BlockCountThreshold> <PlayerDistanceThreshold>500</PlayerDistanceThreshold> <OptimalGridCount>0</OptimalGridCount> <PlayerInactivityThreshold>0</PlayerInactivityThreshold> <PlayerCharacterRemovalThreshold>15</PlayerCharacterRemovalThreshold> <VoxelTrashRemovalEnabled>false</VoxelTrashRemovalEnabled> <VoxelPlayerDistanceThreshold>5000</VoxelPlayerDistanceThreshold> <VoxelGridDistanceThreshold>5000</VoxelGridDistanceThreshold> <VoxelAgeThreshold>24</VoxelAgeThreshold> <EnableResearch>true</EnableResearch> <EnableGoodBotHints>true</EnableGoodBotHints> <OptimalSpawnDistance>16000</OptimalSpawnDistance> <EnableAutorespawn>true</EnableAutorespawn> <EnableBountyContracts>true</EnableBountyContracts> <EnableSupergridding>false</EnableSupergridding> <EnableEconomy>true</EnableEconomy> <DepositsCountCoefficient>1</DepositsCountCoefficient> <DepositSizeDenominator>60</DepositSizeDenominator> <WeatherSystem>true</WeatherSystem> <HarvestRatioMultiplier>0.8</HarvestRatioMultiplier> <TradeFactionsCount>15</TradeFactionsCount> <StationsDistanceInnerRadius>10000000</StationsDistanceInnerRadius> <StationsDistanceOuterRadiusStart>10000000</StationsDistanceOuterRadiusStart> <StationsDistanceOuterRadiusEnd>30000000</StationsDistanceOuterRadiusEnd> <EconomyTickInSeconds>1200</EconomyTickInSeconds> <SimplifiedSimulation>false</SimplifiedSimulation> <SuppressedWarnings /> <EnablePcuTrading>true</EnablePcuTrading> <FamilySharing>true</FamilySharing> <EnableSelectivePhysicsUpdates>false</EnableSelectivePhysicsUpdates> <PredefinedAsteroids>true</PredefinedAsteroids> <UseConsolePCU>false</UseConsolePCU> <MaxPlanets>99</MaxPlanets> <OffensiveWordsFiltering>false</OffensiveWordsFiltering> <AdjustableMaxVehicleSpeed>true</AdjustableMaxVehicleSpeed> <EnableMatchComponent>false</EnableMatchComponent> <PreMatchDuration>0</PreMatchDuration> <MatchDuration>0</MatchDuration> <PostMatchDuration>0</PostMatchDuration> <EnableFriendlyFire>true</EnableFriendlyFire> <EnableTeamBalancing>false</EnableTeamBalancing> <CharacterSpeedMultiplier>1</CharacterSpeedMultiplier> <EnableRecoil>true</EnableRecoil> <EnvironmentDamageMultiplier>1</EnvironmentDamageMultiplier> <EnableGamepadAimAssist>false</EnableGamepadAimAssist> <BackpackDespawnTimer>5</BackpackDespawnTimer> <EnableFactionPlayerNames>false</EnableFactionPlayerNames> <EnableTeamScoreCounters>true</EnableTeamScoreCounters> <EnableSpaceSuitRespawn>true</EnableSpaceSuitRespawn> <MatchRestartWhenEmptyTime>0</MatchRestartWhenEmptyTime> <EnableFactionVoiceChat>false</EnableFactionVoiceChat> <EnableOrca>true</EnableOrca> <MaxProductionQueueLength>50</MaxProductionQueueLength> <PrefetchShapeRayLengthLimit>15000</PrefetchShapeRayLengthLimit> <EnemyTargetIndicatorDistance>20</EnemyTargetIndicatorDistance> </SessionSettings> <LoadWorld>C:\ProgramData\SpaceEngineersDedicated\Cernunos\Saves\Star System 10-25-2023 16-06-44\Sandbox.sbc</LoadWorld> <CrossPlatform>false</CrossPlatform> <IP>0.0.0.0</IP> <SteamPort>8766</SteamPort> <ServerPort>27016</ServerPort> <AsteroidAmount>0</AsteroidAmount> <Administrators /> <Banned /> <GroupID>0</GroupID> <ServerName>Test</ServerName> <WorldName>Star System</WorldName> <VerboseNetworkLogging>false</VerboseNetworkLogging> <PauseGameWhenEmpty>false</PauseGameWhenEmpty> <MessageOfTheDay /> <MessageOfTheDayUrl /> <AutoRestartEnabled>true</AutoRestartEnabled> <AutoRestatTimeInMin>0</AutoRestatTimeInMin> <AutoRestartSave>true</AutoRestartSave> <AutoUpdateEnabled>false</AutoUpdateEnabled> <AutoUpdateCheckIntervalInMin>10</AutoUpdateCheckIntervalInMin> <AutoUpdateRestartDelayInMin>15</AutoUpdateRestartDelayInMin> <AutoUpdateSteamBranch /> <AutoUpdateBranchPassword /> <IgnoreLastSession>false</IgnoreLastSession> <PremadeCheckpointPath /> <ServerDescription /> <ServerPasswordHash /> <ServerPasswordSalt></ServerPasswordSalt> <Reserved /> <RemoteApiEnabled>true</RemoteApiEnabled> <RemoteSecurityKey></RemoteSecurityKey> <RemoteApiPort>8080</RemoteApiPort> <RemoteApiIP /> <Plugins /> <WatcherInterval>30</WatcherInterval> <WatcherSimulationSpeedMinimum>0.05</WatcherSimulationSpeedMinimum> <ManualActionDelay>5</ManualActionDelay> <ManualActionChatMessage>Server will be shut down in {0} min(s).</ManualActionChatMessage> <AutodetectDependencies>true</AutodetectDependencies> <SaveChatToLog>false</SaveChatToLog> <NetworkType>steam</NetworkType> <ConsoleCompatibility>false</ConsoleCompatibility> <NetworkParameters /> <ChatAntiSpamEnabled>true</ChatAntiSpamEnabled> <SameMessageTimeout>30</SameMessageTimeout> <SpamMessagesTime>0.5</SpamMessagesTime> <SpamMessagesTimeout>60</SpamMessagesTimeout> <DedicatedId></DedicatedId> </MyConfigDedicated>
angepasst werden sollen,
IP
Port
und bei LoadWorld soll der Anfang des Wertes geprüft werden (z.b.) die ersten 20 zeichen und wenn diese nicht passen, dann alles nach vorgabe angepasst.
Kann mir dabei jemand helfen ?
-
Nun die Idee hatte ich auch bereits, allerdings möchte ich den Prozess nicht beenden.
-
Hallo,
gibt es die Möglichkeit mit Autoit einer Anwendung den RAM verbrauch zu begrenzen? Sprich pid 123 darf max 10 GB RAM anfordern ?
-
Hallo,
ist es möglich in eine bereits offene Konsole anhand von pid oder hwnd Befehle in ein Konsolenfenster zu schreiben ? Wenn ja wie ?
-
-
das mit den "" scheint daran zu liegen das die Werte via Launchparameter übergeben werden. Ist aber nicht so tragisch.
kann ich das Vorhandensein der 4 Werte prüfen, und bei Bedarf einfügen?
-
Hallo,
lieber spät als nie. sobald die Werte geändert werden werden diese mit den "" versehen, auch wenn vorher keine "" vorhanden waren. Ich habe das Script so geschrieben die json nur angepasst wird wenn die Werte von den soll Werten abweichen.
Kannst Du mir noch ein Beispiel geben wie ich jetzt werde in einem untergeordneten Array in einem Json anpassen. Z.b. unten nun zusätzlich Rcon - Port
z.b.
Code
Alles anzeigen{ "Name" : "v Rising Server", "Description" : "This is a role playing server", "Port" : 27015, "QueryPort" : 27016, "MaxConnectedUsers" : 40, "MaxConnectedAdmins" : 4, "SaveName" : "world1", "Password" : "", "ListOnMasterServer" : true, "AutoSaveCount" : 40, "AutoSaveInterval" : 120, "GameSettingsPreset" : "StandardPvE" "RCON" : { "Enabled": true, "Password": "SecretPassword", "Port": 27015 } }
-
Das Problem habe ich lösen können. Mit
CodeFileOpen($jsonconfig1, 2 + 32) FileWrite($jsonconfig1, _JSON_Generate($oJSON) & @CRLF) FileClose($jsonconfig1)
Dann wurde ein weiteres Problem entdeckt, das einige Json Werte mit Zahlenwerten von Der Anwendung nicht übernommen wurden, weil diese in "" eingebettet waren. Das habe ich in der Json Klasse erst einmal mit einer digit Abfrage provosorisch behoben
-
Ein Problem hat sich noch herausgestellt.
Bei einer Anwendung ist es Wichtig das alle Jsondateinen das Format UTF-16 LE besitzen, ansonsten können die Werte nicht gelesen werden.
ist es möglich, alle Jsondateien in einen festen Ordner via Autoit Script auf dieses Format zu bringen?
-
gefunden ein ) fehlte
danke
-
da bekomme ich ein "Error parsing funktion call".
-
Super Danke es funktioniert alles bis auf das schreiben der test.json
-
ich möchte prüfen ob der Wert gemäß Vorlage korrekt ist und gegebenfalls anpassen.
-
Hallo,
Ich möchte eine Jsondatei prüfen und eventuelle Werte anpassen.
Code
Alles anzeigen{ "Name" : "v Rising Server", "Description" : "This is a role playing server", "Port" : 27015, "QueryPort" : 27016, "MaxConnectedUsers" : 40, "MaxConnectedAdmins" : 4, "SaveName" : "world1", "Password" : "", "ListOnMasterServer" : true, "AutoSaveCount" : 40, "AutoSaveInterval" : 120, "GameSettingsPreset" : "StandardPvE" }
in den Falle sind es die Parameter Port, QueryPort und MaxConnectedUsers
-
-
Hallo,
Code
Alles anzeigenFunc CheckOn() $s_Path = StringReplace($serverdir & $filedir & $g_c_sServerEXE, "\", "\\") $colItems = ObjGet("winmgmts:").ExecQuery('SELECT * FROM Win32_Process WHERE ExecutablePath="' & $s_Path & '"', "WQL") If $colItems.count Then MsgBox(4096, "Prozess vorhanden", "Bestanden.") Else MsgBox(4096, "Prozess nicht vorhanden", "n Bestanden.") EndIf EndFunc Func CheckSteam() $s_Path = StringReplace($serverdir & $filedir & $g_c_sServerEXE, "\", "\\") $colItems = ObjGet("winmgmts:").ExecQuery('SELECT * FROM Win32_Process WHERE ExecutablePath="' & $s_Path & '"', "WQL") If $colItems.count Then MsgBox(4096, "Prozess vorhanden", "Bestanden 1.") Else MsgBox(4096, "Prozess nicht vorhanden", "n Bestanden 1.") EndIf EndFunc
Ich möchte beide Funktionen in unterschiedlichen Zeitabständen in einem Script ausgeführt haben. Kann mir da jemand weiterhelfen ?
-
Ich sage auf jeden Fall einmal vielen dank.
Wie mir mal jemand gesagt hat, man soll immer einfach denken
Läuft Astrein nun
-
Als ich dieses Script entdeckt habe, war das der Anfang mich mit Autoit zu beschäftigen. Da liegt noch ein langer Weg vor mir.
-
ungültige Endung