Imperator: Rome

Imperator: Rome

Catus Cheats Imperator Rome
GOOD_ORLOV 1 May, 2019 @ 1:50pm
Training / Tips
No need to create a new class for a loop. Simply write the class ID that you want to repeat.

namespace = 99_catus_army

99_catus_army.1 = { <<<<<

[...]

option = {
name = "catus_army.1"
scope:catus_unit = {
add_subunit = archers
}
trigger_event = { id = 99_catus_army.1 } <<<<<
}



Picture[yadi.sk]
< >
Showing 1-8 of 8 comments
Catus  [developer] 1 May, 2019 @ 3:54pm 
Thanks for the tip, I'm used to making new classes for EUIV where looping didn't work.
GOOD_ORLOV 1 May, 2019 @ 11:17pm 
Originally posted by Catus:
Thanks for the tip, I'm used to making new classes for EUIV where looping didn't work.

I wrote it without thinking, if implemented in this way, then a new division will be created each time.:steamfacepalm:

# code1
immediate = {
create_unit = {
random_sub_unit = {
destroy_subunit = yes
}
save_scope_as = catus_unit
}
}

And you use this tip just below) in class 99_catus_army.2 without #code1
overlooked, sorry :steamfacepalm:
Catus  [developer] 1 May, 2019 @ 11:20pm 
It was still a good point, I added a flag to the immediate section to only run on the first execution of the loop and saved some code.
Catus  [developer] 1 May, 2019 @ 11:23pm 
Also your tip of looping the class I have added to all the other menus so that its easier to pick more than one option in game.
GOOD_ORLOV 1 May, 2019 @ 11:27pm 
Found a way to add your image to the event.

\common\event_pictures\create_new_file.txt

#code create_new_file.txt:
Name_bg = {
theme = Wonder
picture = "gfx/interface/event_window/Name_picture.dds"
# image format: .dds
}

event:
ID = {
type = country_event
title = "ID"
desc = "ID"

picture = Name_bg
}
GOOD_ORLOV 2 May, 2019 @ 12:29am 
Originally posted by Catus:
It was still a good point, I added a flag to the immediate section to only run on the first execution of the loop and saved some code.

Create Navy:

It is necessary to give the user a choice in which sea he wants to create a fleet.

We prescribe the identifiers of the provinces where the fleet landed.

option = {
name = "Create navy Mare Tyrrhenum"
create_unit = {
name = "Ship!!!"
navy = yes
location = p:2685
}
}

GOOD_ORLOV 2 May, 2019 @ 12:50am 
File: 99_catus_army.txt
I understand what is happening, but I would not refuse to comment.


if = {} - It is clear that the IF but where the condition
else = {}
set_variable = {} Create a variable, this is used for labels. (not = { has_variable = unit_made })
limit = {} minimum? It's vague
max = {} max? It's vague

It would be great if you commented on every step in the file.
it’s difficult: name = "[SCOPE.sRegion ('catus_regi_3'). GetName]" :/

If it does not complicate you)
Catus  [developer] 2 May, 2019 @ 9:18pm 
For the if statement the condition is within the limit = {}.

Imperator Rome does not support flags so instead set_variable is used instead of setting a flag, I think any value would work as long as it matches on the check but 1 is the safest. Setting the variable to zero to clear doesn't work instead the variable has to be removed instead with remove_variable.

Min and max variables are used in ordered scopes but I haven't used them so I'm not sure of how they work yet. They likely just set the bounds for all the scopes that would appear.

When you save a scope using save_scope_as, you can get the name of it by using SCOPE.s.
SCOPE.sRegion for regions, SCOPE.sP for a city == province, SCOPE.sChar for a character name.

The ('catus_regi_3') is the name of the scope that is saved. GetName specifies the value that is needed, which is the name in this case. The [] makes the game know that it will have to search for a value.

I don't know if I'll be commenting everything but if you have a question you can ask.
< >
Showing 1-8 of 8 comments
Per page: 1530 50