Login

russian armor

[CoH2] CheatCommands Mod ULE

29 Dec 2013, 18:17 PM
#21
avatar of HelpingHans
Strategist Badge
Donator 11

Posts: 1838 | Subs: 17

Thanks for the update!
29 Dec 2013, 18:22 PM
#22
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

I can confirm the error is now fixed :D

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:
Code

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.
29 Dec 2013, 18:47 PM
#23
avatar of GeneralKong

Posts: 46

I think I found out the problem, I loaded up the Leningrad campaign conversion map by Lund, it does not work, so I exit the game, go online, and the game downloads 13.6 mgs of data, I load up the same map, and it suddenly works again

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 :)
29 Dec 2013, 21:33 PM
#24
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Are these issues only appearing with Custom maps downloaded from the Steam Workshop?
29 Dec 2013, 21:35 PM
#25
avatar of GeneralKong

Posts: 46

nope, all maps, in skirmish, tow, and campaign beforehand

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
29 Dec 2013, 22:09 PM
#26
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

You gotta be careful in campaign missions, especially with removing enemy units. I tried the M01 without any issues. Can you confirm being able to load M01 and run "dofile("ccm/ccm.scar")" without errors?
29 Dec 2013, 22:40 PM
#27
avatar of GeneralKong

Posts: 46

yeah I can load it in the first mssion too
29 Dec 2013, 22:46 PM
#28
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Are there any SP missions where even loading the script would cause an error?
29 Dec 2013, 23:48 PM
#29
avatar of GeneralKong

Posts: 46

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

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
30 Dec 2013, 00:11 AM
#30
avatar of Janne252
Admin Black Badge
Patrion 15

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.
30 Dec 2013, 00:22 AM
#31
avatar of GeneralKong

Posts: 46

so far the only thing I edited was the sbp part of the ccm.scar file, so that i could rearange the units so that I can more easily spawn the units I will use over the ones I wont

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
30 Dec 2013, 01:27 AM
#32
avatar of GeneralKong

Posts: 46

Code
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
30 Dec 2013, 15:56 PM
#33
avatar of HelpingHans
Strategist Badge
Donator 11

Posts: 1838 | Subs: 17

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?
30 Dec 2013, 17:11 PM
#34
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Code
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


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.
30 Dec 2013, 18:43 PM
#35
avatar of GeneralKong

Posts: 46

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
31 Dec 2013, 09:09 AM
#36
avatar of HFSzsoci

Posts: 119

Thx Janne252!!!
31 Dec 2013, 11:18 AM
#37
avatar of Janne252
Admin Black Badge
Patrion 15

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
2 Jan 2014, 20:30 PM
#38
avatar of GeneralKong

Posts: 46

Awesome, works perfectly :D

EDIT: hey Janne, is there any scar code that would make slot items spawned by the cheats have no drop rate?
10 Jan 2014, 16:29 PM
#39
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

GeneralKong, I think you really should do double posts instead of editing an older post.
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
10 Jan 2014, 18:30 PM
#40
avatar of GeneralKong

Posts: 46

apologies, usually moderators and topic creators prefer it when last post is edited rather than a new one added
1 user is browsing this thread: 1 guest

Livestreams

United States 26
Russian Federation 6
Peru 2
unknown 0

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

846 users are online: 846 guests
1 post in the last 24h
9 posts in the last week
27 posts in the last month
Registered members: 50009
Welcome our newest member, qq801com
Most online: 2043 users on 29 Oct 2023, 01:04 AM