[CoH2] CheatCommands Mod ULE
Posts: 1838 | Subs: 17
Posts: 3421 | Subs: 11
I can confirm the error is now fixed
EDIT: except in the TOW missions and some skrimish maps, where the command returns with another message
ccm/ccm.luaconstauto.scar:21: attempt to index global 'BP_GetEntityBlueprint'(a nil value)
also, what I meant was how do I edit the scar file so that when I spawn buildings and such with it, that they are owned by the world player(unless a unit is selected by a player)
EDIT: broken code.
That sounds really weird. Are you able to use in standard 1v1/2v2 etc. maps without issues?
EDIT:
Fixed code for spawning as neutral if nothing is selected:
function SpawnSquadAtMouse(hkey)
local onwer = Selection.GetPlayer()
local spawn_as_neutral = not Selection.GetPlayer(true)
local page = g_help_page_index[g_settings.selected_race][2]
local num = table.getn(g_bindkeys)
local idx = ((page - 1) *num)
local index = idx + hkey
local t_source
if index == 0 then index = 1 end
if g_settings.spawntable == 1 then
t_source = g_sbp
elseif g_settings.spawntable == 2 then
t_source = g_raw_sbp
end
if index <= table.getn(t_source[g_settings.selected_race]) then
local sbp = BP_GetSquadBlueprint(t_source[g_settings.selected_race][index])
local pos = Misc_GetMouseOnTerrain()
local squad = Squad_CreateAndSpawnToward(sbp, onwer, 0, pos, pos)
DisplayText("Spawned squad "..Squad.GetText(squad))
if spawn_as_neutral then
Squad_SetWorldOwned(squad)
end
end
end
function SpawnEntityAtMouse(hkey)
local onwer = Selection.GetPlayer()
local spawn_as_neutral = not Selection.GetPlayer(true)
owner = Selection.GetPlayer()
local page = g_help_page_index[g_settings.selected_race][2]
local num = table.getn(g_bindkeys)
local idx = ((page - 1) *num)
local index = idx + hkey
local t_source
if index == 0 then index = 1 end
if g_settings.spawntable == 1 then
t_source = g_ebp
elseif g_settings.spawntable == 2 then
t_source = g_raw_ebp
end
if index <= table.getn(t_source[g_settings.selected_race]) then
local ebp = BP_GetEntityBlueprint(t_source[g_settings.selected_race][index])
local pos = Misc_GetMouseOnTerrain()
local entity = Entity_CreateAndSpawnToward(ebp, onwer, pos, pos)
DisplayText("Spawned entity "..Entity.GetText(entity))
if spawn_as_neutral then
Entity_SetWorldOwned(entity)
end
end
end
Thanks for the update!
Let me know if you run up to any issues with the script.
Posts: 46
thing is, everytime you finish a session, and go back to it later, you always have to download the 13.6mg of data
also thanks for the code
Posts: 3421 | Subs: 11
Posts: 46
EDIT: it seems the issues might be staying with the campaign, I seem to be able to play normally now, it just cant work with campaign sadly
Posts: 3421 | Subs: 11
Posts: 46
Posts: 3421 | Subs: 11
Posts: 46
Edit: tried activating in skirmish, worked, and tried activating it in the second mission, I will see how far I can go in the campaign
Posts: 3421 | Subs: 11
it seems that the first mssion is the only one that works, but then again, since it is random whether it works or not, kinda makes it hard to tell
Could please give a detailed explanation of what you did when you encountered an error?
- Was it the first time you ran "dofile("ccm/ccm.scar")"?
- At what point did you ran the command?
- What SP mission/TOW mission etc.?
- Snippet from warnings.log
- Have you edited the scripts and if you have in what way?
Please note that almost any action in Single player could cause fatal scar errors so please make sure you are not causing them by yourself.
Posts: 46
at the very start of any TOW, skrimish or Campaign, I use the "dofile("ccm/ccm.scar")" command
and the missions/tow/skrimish maps it works on are random
Posts: 46
03:07:28.07 SCAR ERROR Callstack:
C [C] Ln -1 (EGroup_GetSpawnedEntityAt)
Lua moscow_outskirts.scar"] Ln 977 (CapturePoints_Set)
Lua moscow_outskirts.scar"] Ln 3839 (OnStart)
Lua Objectives.scar"] Ln 1266 (__objectiveDelayedStart)
03:07:28.07 GameObj::OnFatalScarError: [EGroup_GetSpawnedEntityAt: Invalid Spawned EntityGroupObs index 1
Lua moscow_outskirts.scar"] Ln 977 (CapturePoints_Set)
Lua moscow_outskirts.scar"] Ln 3839 (OnStart)
Lua Objectives.scar"] Ln 1266 (__objectiveDelayedStart)
] 1680
in mission 3, when your are ordered to fallback, you units's "Retreat" ability wont unlock, and the playable area wont expand
Posts: 1838 | Subs: 17
Posts: 3421 | Subs: 11
Code03:07:28.07 SCAR ERROR Callstack:
C [C] Ln -1 (EGroup_GetSpawnedEntityAt)
Lua moscow_outskirts.scar"] Ln 977 (CapturePoints_Set)
Lua moscow_outskirts.scar"] Ln 3839 (OnStart)
Lua Objectives.scar"] Ln 1266 (__objectiveDelayedStart)
03:07:28.07 GameObj::OnFatalScarError: [EGroup_GetSpawnedEntityAt: Invalid Spawned EntityGroupObs index 1
Lua moscow_outskirts.scar"] Ln 977 (CapturePoints_Set)
Lua moscow_outskirts.scar"] Ln 3839 (OnStart)
Lua Objectives.scar"] Ln 1266 (__objectiveDelayedStart)
] 1680
in mission 3, when your are ordered to fallback, you units's "Retreat" ability wont unlock, and the playable area wont expand
Thanks. I'll take a look at this.
The cheat mod currently does not allow people to use it to unlock bulletins. Or is it just you cannot gain bulletins in a custom game?
-dev mode disables bulletin unlocks. Not sure if same applies for xp gain and achievements.
Posts: 46
Posts: 119
Posts: 3421 | Subs: 11
Hey Janne, if I could recommend a function, will you be able to add a command that when used, will decrease the spead of both selected infantry and vehicles to walking speed, it would be good for videos
Version 0.4 - December 31st 2013
- Press Control + PageUP to increase selection movement speed
- Press Control + PageDown to decrease selection movement speed
- Unit spawns will spawn as neutral if no player units are selected
Posts: 46
EDIT: hey Janne, is there any scar code that would make slot items spawned by the cheats have no drop rate?
Posts: 3421 | Subs: 11
Or perhaps you could notify me via PM or something?
Anyway, I don't think I have any control over drop rate.
Update to the mod:
Download version 0.5 - January 10th 2014
This is mainly an update fixing some community reported issues and adding community requested features.
- Added infinite population cap to "Add infinite resources"
- Added "Increase selection veterancy rank"
- Freed Control + [0-1] hotkeys for control group usage
Posts: 46
Livestreams
64 | |||||
6 | |||||
5 | |||||
3 | |||||
107 | |||||
27 | |||||
24 | |||||
7 | |||||
6 | |||||
5 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.600215.736+15
- 3.34957.860+14
- 4.1107614.643+8
- 5.305114.728+1
- 6.916405.693-2
- 7.273108.717+24
- 8.722440.621+4
- 9.1041674.607-2
- 10.17146.788+1
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
8 posts in the last week
34 posts in the last month
Welcome our newest member, nohuvin
Most online: 2043 users on 29 Oct 2023, 01:04 AM