Community Forums > Voobly General > General Discussion / Off Topic > How to disable a building on a custom map

How to disable a building on a custom map

 Denver17


Posted 30 March 2023 - 7:37 pm
I have a custom map in which I want to disable the market building. Could anyone help me out please, how to do it?
Link | Reply | Quote
 +pablo@voobly

Community Patch Developer


Posted 30 March 2023 - 9:36 pm
By looking at the RMS guide:
[You must login to view link]#

You can not disable the building as it's triggered by Feudal Age. What you can do is modify the attribute ATTR_TRAIN_BUTTON, put it to 0 or some very big number so it doesn't appear. I'm not sure how the hotkey will react, though. You can also set their health to negative so it dies instantly.
Link | Reply | Quote
 Denver17


Posted 30 March 2023 - 9:46 pm
your answer is awesome but it takes me nearly 2 to 3 days to understand. thank you very much
Link | Reply | Quote
 +pablo@voobly

Community Patch Developer


Posted 30 March 2023 - 10:42 pm
Denver17 wrote:
your answer is awesome but it takes me nearly 2 to 3 days to understand. thank you very much
Sorry, I know a lot of modding and assume that people that ask this questions have some understanding and are just asking for second opinions.

The point is that throught the ATTR_SET command you can modify attributes of units, maybe some of them help your purpose.

Actually, there's also the ATTR_DISABLE command. That one could work or serve a different purpose with similar name.

You should write something like:
Code:
#const DARK_AGE_MARKET 84 effect_amount SET_ATTRIBUTE DARK_AGE_MARKET ATTR_DISABLE 0
Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 8:59 am
never mind, thanks again for helping me out! I keep trying.
Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 9:01 am
Here's the RM Script I am not getting any idea. Where to place those lines
Attachments:
NomadCrazy.rms (file size: 17.34 KB)
Link | Reply | Quote
 +pablo@voobly

Community Patch Developer


Posted 31 March 2023 - 11:12 am
I found the simplest way to do it. Just hide the button:

Write this before the <PLAYER_SETUP> section
Code:
#const DARK_AGE_MARKET 84

and inside the <PLAYER_SETUP>:
Code:
effect_amount SET_ATTRIBUTE DARK_AGE_MARKET ATTR_TRAIN_BUTTON 255

Here is a full example, for an Arabia-like map:
Code:
#const DARK_AGE_MARKET 84 <PLAYER_SETUP> random_placement ai_info_map_type ARABIA 0 0 0 effect_amount SET_ATTRIBUTE DARK_AGE_MARKET ATTR_TRAIN_BUTTON 255 <LAND_GENERATION> . . .
Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 12:00 pm
ok thanks. I will do it
Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 12:22 pm
Didn't work. Th game has just got stopped!
Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 12:26 pm
here's the screen shot attached. PFA
Attachments:
error.jpg (file size: 349.13 KB)

Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 12:35 pm
Here is the RMS file I changed as you said!
Attachments:
RMS.jpg (file size: 141.01 KB)

Link | Reply | Quote
 +pablo@voobly

Community Patch Developer


Posted 31 March 2023 - 12:55 pm
If that's original AOC, I believe you have to define some extra stuff,
Code:
#const SET_ATTRIBUTE 0 #const ATTR_TRAIN_BUTTON 43 #const DARK_AGE_MARKET 84

In Wololokingdoms and later versions of the game, they are programmed in the game. Otherwise, you have to define them
Link | Reply | Quote
 Denver17


Posted 31 March 2023 - 1:30 pm
ok I try and give a reply
Link | Reply | Quote
 Denver17


Edited 31 March 2023 - 7:10 pm by Denver17
Thank you Very Much Its working ;yahoo ;yahoo ;yahoo ;yahoo ;yahoo ;yahoo
Link | Reply | Quote
 +pablo@voobly

Community Patch Developer


Posted 31 March 2023 - 1:40 pm
Glad I could help, enjoy.


Link | Reply | Quote
[1]234
Displaying 1 - 15 out of 50 posts
Forum Jump:
1 User(s) are reading this topic (in the past 30 minutes)
0 members, 1 guests

今人気なコンテンツ:
Word Association (65 人が視聴中)
Photos of Voobly Players (19 人が視聴中)
AoKTS updates (15 人が視聴中)
CBA PathBlood 1.8.0 (14 人が視聴中)
1.6 reward campaing (14 人が視聴中)
Devil May Cry (13 人が視聴中)
TIW 2020 Map votes (10 人が視聴中)
過去一週間でアクティブなスレッド