I'm looking for a way to disable the use of commander off-map abilities like artillery and airstrikes within a specific territory. I've designed it to basically be a transparent roofed deep bunker, and I don't want commander abilities to be useable on it, similar to an HQ zone, but I still need it to be capturable.
One way I figured it might be possible is by creating a region that mirrors the territory, then attaching some SCAR command to that region. But I have 0 experience when it comes to using SCAR on maps, does anyone have any idea what I could do to make it happen?
Disable commander abilities within a specific territory?
19 Feb 2018, 04:14 AM
#1
Posts: 9
23 Feb 2018, 19:47 PM
#2
Posts: 9
Could really use some help on this one, I'm sure it has to be possible.
7 Mar 2018, 23:01 PM
#3
Posts: 9
One more try, does ANYONE know how to either disable off-map abilities like artillery and air strikes on a particular territory?
8 Mar 2018, 01:06 AM
#4
Posts: 2742
I don't know SCAR, which might have the potential to sidestep this, but otherwise I'm not sure it can be done without being able to create new types of territory sectors, (As in, VPs or Base sectors) which I'm fairly certain isn't possible.
Potentially, I think you could create a base territory sector that is owned by 'world' that isn't capturable. But then the sector wouldn't be capturable. This might satisfy the condition of restricting commander abilities, though.
You could then put a resource point, a VP, (or whatever) without a contiguous sector if it's to have cutoff properties. Abilities could still be used in those little spots and the cap circle though.
Certainly not a pretty way of doing it through the map making end of things. But that's the best I can come up with at this time.
Potentially, I think you could create a base territory sector that is owned by 'world' that isn't capturable. But then the sector wouldn't be capturable. This might satisfy the condition of restricting commander abilities, though.
You could then put a resource point, a VP, (or whatever) without a contiguous sector if it's to have cutoff properties. Abilities could still be used in those little spots and the cap circle though.
Certainly not a pretty way of doing it through the map making end of things. But that's the best I can come up with at this time.
8 Mar 2018, 02:09 AM
#5
Posts: 4183 | Subs: 4
Lemme tag eliw00d. He's a wizard when it comes to SCAR and maybe he'll have some advice. However when he gets on .org it is at his leisure I assume so I don't know when and where he'll arrive.
Need your help if you can offer it
9 Mar 2018, 00:38 AM
#6
Posts: 9
Appreciate the responses, and yeah SCAR is even harder to get into than normal mapmaking, it seems people have to discover possible commands by looking through the code. Already looked through one of the collected lists and nothing really stood out to me as doing what I intended.
And yeah I tried the base territory sector trick already, which only limits some larger off-map abilities, but without a captureable point no one has a reason to enter that area anyway.
And yeah I tried the base territory sector trick already, which only limits some larger off-map abilities, but without a captureable point no one has a reason to enter that area anyway.
15 Mar 2018, 02:14 AM
#7
Posts: 9
I understand this requested feature is clearly not something that's very common, but I'm curious on how people felt about the concept of not just Infantry-Only areas on otherwise normal maps, but areas that represent an interior for a kind of smaller-scale tactical gameplay within a map.
I've only ever seen what looked like an open topped interior purposely designed that way in one single map, but the concept resonated with me as something that was missing from Company of Heroes in general.
Is the lack of ability to disable things like airstrikes and arty in such an area the reason why they're not as prevalent in maps as they ought to be?
I've only ever seen what looked like an open topped interior purposely designed that way in one single map, but the concept resonated with me as something that was missing from Company of Heroes in general.
Is the lack of ability to disable things like airstrikes and arty in such an area the reason why they're not as prevalent in maps as they ought to be?
19 Mar 2018, 13:53 PM
#8
Posts: 12
Hey Domonic,
A heads up, if I say something that is wrong I apologize, as my map making experience at this time is pretty much zero. I have however been working quite a bit with scar lately so maybe I can provide some help.
Not sure what you have tried yet. I was looking through the ScarDoc and there is a player method that allows you to specify a ScarMarker location and prevents the use of targeted abilities at that location.
This is what I would try, but note that I haven't personally used this method so I'm not sure how well it works for your needs. You will need to do a bit of legwork.
First off, I would go into the attribute editor, and in the options in the upper left corner you want to export the "lua const export" (something along those lines), this should give you a scar file with lua tables containing every blueprint grouped by faction. If you want a sample of what this looks like, you can look here in my github. I'm actually pretty sure you could even copy the abilities from that one if you want, as it is an unedited export.
I would then create a new lua table containing all of the abilities you wish to restrict in your bunker. To help with this, I would have the attribute editor open at the same time and look inside the "commander" category. You should be able to better identify them that way.
You will then need to create a ScarMarker in your bunker area in order to tell the scar function where you want to disable those abilities.
Your scar file could look something like this:
Feel free to use that code and look around that github project for examples. Just a forewarning that it's a work in progress.
I'm not expert but I've put in about 100 hours so far into my mod and learned quite a bit.
I'm at work and can't test this right now, but later on tonight I'll see if this will work.
A heads up, if I say something that is wrong I apologize, as my map making experience at this time is pretty much zero. I have however been working quite a bit with scar lately so maybe I can provide some help.
Not sure what you have tried yet. I was looking through the ScarDoc and there is a player method that allows you to specify a ScarMarker location and prevents the use of targeted abilities at that location.
This is what I would try, but note that I haven't personally used this method so I'm not sure how well it works for your needs. You will need to do a bit of legwork.
First off, I would go into the attribute editor, and in the options in the upper left corner you want to export the "lua const export" (something along those lines), this should give you a scar file with lua tables containing every blueprint grouped by faction. If you want a sample of what this looks like, you can look here in my github. I'm actually pretty sure you could even copy the abilities from that one if you want, as it is an unedited export.
I would then create a new lua table containing all of the abilities you wish to restrict in your bunker. To help with this, I would have the attribute editor open at the same time and look inside the "commander" category. You should be able to better identify them that way.
You will then need to create a ScarMarker in your bunker area in order to tell the scar function where you want to disable those abilities.
Your scar file could look something like this:
-- This allows us to use Relic's Scar functions
import('ScarUtil.scar')
function disableAbilitiesInBunker()
-- Your comma separated list of abilities to restrict
local disabledAbilities = {
AIRDROPPED_MINES_MP = BP_GetAbilityBlueprint("airdropped_mines_mp"),
ARTILLERY_155MM = BP_GetAbilityBlueprint("artillery_155mm"),
ARTILLERY_SMOKE_BARRAGE = BP_GetAbilityBlueprint("artillery_smoke_barrage"),
}
-- Get your ScarMarker you placed inside the bunker
local bunkerMarker = Marker_FromName("Your ScarMarker's name")
-- For each player, disable each ability in the above list at the marker location
for i=1,World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
for k,ability in pairs(disabledAbilities) do
Player_AddAbilityLockoutZone(player, ability, bunkerMarker)
end
end
end
Feel free to use that code and look around that github project for examples. Just a forewarning that it's a work in progress.
I'm not expert but I've put in about 100 hours so far into my mod and learned quite a bit.
I'm at work and can't test this right now, but later on tonight I'll see if this will work.
20 Mar 2018, 01:01 AM
#9
Posts: 9
It's going to take me quite a while to understand all this, but if I'm reading this correctly, I would need to tag each individual ability to be unuseable in that area? What about abilities added with an overhaul mod lie Spearhead?
21 Mar 2018, 16:57 PM
#10
Posts: 12
It's going to take me quite a while to understand all this, but if I'm reading this correctly, I would need to tag each individual ability to be unuseable in that area? What about abilities added with an overhaul mod lie Spearhead?
Yup that's exactly right. It is quite cumbersome. It is what I've been doing for the mod I have been working on. I've had to break up the blueprints into my own categories in code to make it more manageable.
As for adding units/abilities from another mod, I think if you have the mod ID you should be able to use the format "modId:blueprint" inside the blueprint function.
Ex: If mod ID is "1a2b3c4d192837465"
CUSTOM_AIRSTRIKE_MP = BP_GetAbilityBlueprint("1a2b3c4d192837465:custom_airstrike_mp")
The mod ID is located on the bottom-right hand side of the editor tools... this is how I import custom unit blueprints created in the attribute editor.
However, I'm not sure how you would obtain the mod ID for a 3rd-party mod. Maybe you could extract the SGA file and take a look inside its contents, but I'm not entirely sure. That's something eliw00d or other may be able to answer on.
If you need any help understanding the code just send me a message and I'd be glad to help.
21 Mar 2018, 22:50 PM
#11
Posts: 9
Wow, I was hoping abilities would at least be grouped by some easy prefix to get them all in a few lines of code, so that even abilities added/edited by mods would be defined by them.
In any case thanks for the possible solution to this. I'll be re-reading this and ill look into trying it out.
In any case thanks for the possible solution to this. I'll be re-reading this and ill look into trying it out.
PAGES (1)
0 user is browsing this thread:
Livestreams
23 | |||||
12 | |||||
11 | |||||
1 | |||||
250 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.35057.860+15
- 3.1110614.644+11
- 4.639230.735+2
- 5.276108.719+27
- 6.306114.729+2
- 7.921406.694-1
- 8.262137.657+3
- 9.722440.621+4
- 10.17146.788+1
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1237
Board Info
280 users are online:
280 guests
2 posts in the last 24h
4 posts in the last week
35 posts in the last month
4 posts in the last week
35 posts in the last month
Registered members: 49210
Welcome our newest member, Shunnarah
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Shunnarah
Most online: 2043 users on 29 Oct 2023, 01:04 AM