Quick copy & paste from something I ran up earlier:
Note I just edited the first entry I could find so the in-game dialogue is still for the "Nationalises Private Sector" event, change this if it bothers you obviously.
Add this text to "\events\PoliticalEvents.txt" to create the event itself.
EDIT
Unless you really feel the need, DO NOT backup the file first, as this results in both files being read by the game, duplicate entries for events etc and therefore CTDs. If you really want to backup first make sure the backups are kept in seperate folders, preferably outside of your HoI3 directory.
##########################################
# Government nationalizes private sector #
##########################################
country_event = {
id = 5050
trigger = {
not = { government = market_liberalism }
not = { government = social_democracy }
not = { government = social_liberalism }
not = { government = social_conservatism }
dissent = 5000
}
mean_time_to_happen = {
months = 24
modifier = {
factor = 2.0
war = yes
}
}
title = "EVTNAME5005"
desc = "EVTDESC5005"
picture = "private_sector"
option = {
name = "EVTOPTA5005" # OK
add_country_modifier = {
name = "nationalization_of_private_sector_ic"
duration = 4380
}
}
}
Then add the following text to \common\event_modifiers.txt to create the actual effects for the event, again edit these if you wish.
nationalization_of_private_sector_ic = {
dissent = -10.00
global_ic = 8.00
global_manpower_modifier = 10.00
global_leadership_modifier = 10.00
global_research_speed = 10.00
research_efficiency = 100.00
global_money = 10.00
global_metal = 10.00
global_supplies = 10.00
global_metal = 10.00
global_energy = 10.00
global_oil = 10.00
global_rare_materials = 10.00
unit_recruitment_time = -1.0
war_consumer_goods_demand = -1.00
peace_consumer_goods_demand = -1.00
espionage_bonus = 10.00
ruling_party_support = 10.00
}
Then you just need to fire the event (bring up console with tilde, then type "event 5050" and strike enter) to enable the cheats!
Hopefully shouldn't fire at random due to the dissent = 500 requirement.
Hope that helps someone!
Edit: Try to stick to the formatting already in the file if possible, doesn't show up properly on here , don't think it should matter too much though.
[Edited by overweightninja, 8/11/2009 3:49:41 PM]
[Edited by overweightninja, 8/12/2009 4:52:59 AM]
[Edited by overweightninja, 12/4/2009 1:45:36 PM]
The Problem with this is that you dont have it for yourself, the AI will get it also because of random event.
You can do it well better when you create an event which is only working for yourself.
Before you begin, make allways backups of all files on which you change anything. When you **** up your game with modding, it is annoying to rebuild it without reinstalling. At best, copy the files in a other folder, like HoI III/Backup or something. It is safer, then the game will take also files which are not needed, but same format as other files.
First, you need an ID. If you have no mod like DiDay installed, then the ID 99999 will do fine work.
country_event = {
id = 99999
You need a trigger also, which should check if you are AI or player. Simple task:
trigger = {
ai = no
Then you can give the event a title, description and eventually a picture from another event.
title = "Advantage"
desc = "This will give you a real advantage!"
picture = "great_war_manifestion"
After this short thing, the option will cost a lil more work to be done. As explained above, you need to edit a second file.
In this file you can also create a new event modifier, like advantage_modifier or something else. One important thing is to know that there cannot exist 2 modifiers with the same name, the game will crash on loading or when the event is fired at any time.
But at all, you can copy and paste the modifier above in your new modifier, it works fine.
Switch back to the other file with the events in and add your modifier as above in the options block with you choosen name like in the modifier file.
The duration is needed, otherwise it wont work.
When you wanna dug deeper into modding, look at other events and create for yourself an country flag to check this as a trigger also.
Save the files and start a game. If you have done it right, you will see what the click on the OK button do. It is like other events and shows you a list with the details.
Have fun!
PS: When you dont want to research the stuff, then you need to look into a savegame with any editor.
Search for your country tag, it looks like GER=. Search case sensitive, you will find it soon.
Quick copy & paste from something I ran up earlier:
Note I just edited the first entry I could find so the in-game dialogue is still for the "Nationalises Private Sector" event, change this if it bothers you obviously.
Add this text to "\events\PoliticalEvents.txt" to create the event itself.
EDIT
Unless you really feel the need, DO NOT backup the file first, as this results in both files being read by the game, duplicate entries for events etc and therefore CTDs. If you really want to backup first make sure the backups are kept in seperate folders, preferably outside of your HoI3 directory.
##########################################
# Government nationalizes private sector #
##########################################
country_event = {
id = 5050
trigger = {
not = { government = market_liberalism }
not = { government = social_democracy }
not = { government = social_liberalism }
not = { government = social_conservatism }
dissent = 5000
}
mean_time_to_happen = {
months = 24
modifier = {
factor = 2.0
war = yes
}
}
title = "EVTNAME5005"
desc = "EVTDESC5005"
picture = "private_sector"
option = {
name = "EVTOPTA5005" # OK
add_country_modifier = {
name = "nationalization_of_private_sector_ic"
duration = 4380
}
}
}
Then add the following text to \common\event_modifiers.txt to create the actual effects for the event, again edit these if you wish.
nationalization_of_private_sector_ic = {
dissent = -10.00
global_ic = 8.00
global_manpower_modifier = 10.00
global_leadership_modifier = 10.00
global_research_speed = 10.00
research_efficiency = 100.00
global_money = 10.00
global_metal = 10.00
global_supplies = 10.00
global_metal = 10.00
global_energy = 10.00
global_oil = 10.00
global_rare_materials = 10.00
unit_recruitment_time = -1.0
war_consumer_goods_demand = -1.00
peace_consumer_goods_demand = -1.00
espionage_bonus = 10.00
ruling_party_support = 10.00
}
Then you just need to fire the event (bring up console with tilde, then type "event 5050" and strike enter) to enable the cheats!
Hopefully shouldn't fire at random due to the dissent = 500 requirement.
Hope that helps someone!
Edit: Try to stick to the formatting already in the file if possible, doesn't show up properly on here , don't think it should matter too much though.
[Edited by overweightninja, 8/11/2009 3:49:41 PM]
[Edited by overweightninja, 8/12/2009 4:52:59 AM]
[Edited by overweightninja, 12/4/2009 1:45:36 PM]
The Problem with this is that you dont have it for yourself, the AI will get it also because of random event.
You can do it well better when you create an event which is only working for yourself.
Before you begin, make allways backups of all files on which you change anything. When you **** up your game with modding, it is annoying to rebuild it without reinstalling. At best, copy the files in a other folder, like HoI III/Backup or something. It is safer, then the game will take also files which are not needed, but same format as other files.
First, you need an ID. If you have no mod like DiDay installed, then the ID 99999 will do fine work.
country_event = {
id = 99999
You need a trigger also, which should check if you are AI or player. Simple task:
trigger = {
ai = no
Then you can give the event a title, description and eventually a picture from another event.
title = "Advantage"
desc = "This will give you a real advantage!"
picture = "great_war_manifestion"
After this short thing, the option will cost a lil more work to be done. As explained above, you need to edit a second file.
In this file you can also create a new event modifier, like advantage_modifier or something else. One important thing is to know that there cannot exist 2 modifiers with the same name, the game will crash on loading or when the event is fired at any time.
But at all, you can copy and paste the modifier above in your new modifier, it works fine.
Switch back to the other file with the events in and add your modifier as above in the options block with you choosen name like in the modifier file.
The duration is needed, otherwise it wont work.
When you wanna dug deeper into modding, look at other events and create for yourself an country flag to check this as a trigger also.
Save the files and start a game. If you have done it right, you will see what the click on the OK button do. It is like other events and shows you a list with the details.
Have fun!
PS: When you dont want to research the stuff, then you need to look into a savegame with any editor.
Search for your country tag, it looks like GER=. Search case sensitive, you will find it soon.