Ultimate Apocalypse is a mod for Dawn of War Soulstorm, which aims to create the most diverse possible unit and faction selection within the confines of the original DOW engine. We strive to create the most engaging and balanced Warhammer 40,000 game that we can, without sacrificing the fun factor. From hordes of Orks to the towering Titans, you can always find a new way to play UA. We invite all of you to join us on our Discord server to keep up with the development of the mod!

Forum Thread
  Posts  
Way to control disabled AI for battle tests (Games : Dawn of War : Mods : Ultimate Apocalypse Mod (DOW SS) : Forum : Fan Thread : Way to control disabled AI for battle tests) Locked
Thread Options
Apr 8 2015 Anchor

I was looking for way to test units and I found it, maybe it will be useful to someone. You need to change this file: Dawn of War - Soulstorm\UltimateApocalypse\data\scar\winconditions\addon_change_players.scar (don't forget to make a backup) just add this line Cpu_EnableAll(false) here:

function switchControl( dead, noplayersleft )
local player = Tut_GetLocalPlayerIndex() + 1
if (noplayersleft == false) then -- Fixed by me, Cylarne, someone made a goof here which causes a fatal SCAR error. The "if" statement was added.
--does the switch
W40k_SwitchToPlayer( g_player[g_activePlayer].playerID, true )
--center hq for better gameplay
--Camera_FocusOnTargetPos( Player_GetStartPosition( g_player[g_activePlayer].playerID ), 0 )
--change the players' names, too
local name = g_player[g_activePlayer].name
g_player[g_activePlayer].name = g_player[player].name
g_player[player].name = name
Setup_SetPlayerName( g_player[g_activePlayer].playerID, g_player[g_activePlayer].name )
Setup_SetPlayerName( g_player[player].playerID, g_player[player].name )
Cpu_EnableAll(false) --HERE
end

and maybe you find it usable to disable center camera to hq when switching players while testing then just comment this line:
--Camera_FocusOnTargetPos( Player_GetStartPosition( g_player[g_activePlayer].playerID ), 0 )
like it already done in the code above

now run the game and start skirmish > 3 players with this settings:
- players set teams
- add bots with same team as your team these bots for testing and 1 bot with different team to could run game
- Lock teams set NO
- Addon: AI Dummies
- Addon: Change Players
- and maybe disable fog and quick-start for convenience
- any other settings you like
run game, open diplomaty menu and break alliance, now you can switch players and test whatever you want for example who will win 1vs1 warboss or chaos lord (of course warboss)

Edited by: Zilian

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.