Bene oggi pomeriggio mi sono fatto una cultura (da zero) su come scrivere gli eventi, tutti gli eventini di prova che mi sono fatto hanno funzionato alla grande, ma appena sono passato a qualcosa di più complesso immancabilmente sorgono problemi... Ok l'obiettivo sarebbe di fare un evento per l'Impero Germanico di AAR (coutry tag = U08) con una tripla scelta dove ciascuna dovrebbe triggerare un evento specifico per il country tag U36 (che sarebbe un fantoccio africano della germania) Questo è l'evento per la Germania Codice: event = { id = 1000000 country = U08 name = "La Germania arma le sue colonie" desc = "Il nuovo stato tedesco in Africa è enorme e pressocchè indifeso, il Kaiser intende rinforzare i corpi a difesa dell'Africa" date = { day = 0 month = january year = 1919 } deathdate = { day = 31 month = december year = 1960 } offset = 10 picture = afrika_korps style = 1 trigger = { exists = U36 puppet = { country = U36 country = U08 } atwar = no manpower = 10 money = 3000 } action_a = { name = "Ripristina le vecchie Schutztruppe" ai_chance = 10 command = { type = trigger which = 1000001 } } action_b = { name = "Ripristina e rinforza le Schutztruppe" ai_chance = 60 command = { type = dissent value = 1 } command = { type = manpowerpool value = -10 } command = { type = trigger which = 1000002 } } action_c = { name = "Istituisci gli Afrikakorps!" ai_chance = 30 command = { type = dissent value = 3 } command = { type = money value = -3000 } command = { type = manpowerpool value = -10 } command = { type = gain_tech which = 1396 } #blueprint fanteria motorizzata command = { type = trigger which = 1000003 } } } La prima scelta dovrebbe attivare questo evento Codice: event = { id = 1000001 country = U36 name = "La Germania ci affida il vecchio corpo degli Schutztruppe" date = { day = 0 month = january year = 1919 } deathdate = { day = 0 month = january year = 1960 } picture = afrika_korps style = 1 action_a = { name = "Non basteranno" command = { type = dissent value = -1 which = U36 } command = { type = add_division which = "1. Schutztruppe Division" value = militia } command = { type = add_division which = "2. Schutztruppe Division" value = militia } command = { type = add_division which = "3. Schutztruppe Division" value = militia } command = { type = add_division which = "4. Schutztruppe Division" value = militia } } } La seconda questo Codice: event = { id = 1000002 country = U36 name = "La Germania ci affida in forze le Schutztruppe" date = { day = 0 month = january year = 1919 } deathdate = { day = 0 month = january year = 1960 } picture = afrika_korps style = 1 action_a = { name = "Ringraziamo il Kaiser" command = { type = dissent value = -2 } command = { type = add_division which = "1. Schutztruppe Division" value = militia } command = { type = add_division which = "2. Schutztruppe Division" value = militia } command = { type = add_division which = "3. Schutztruppe Division" value = militia } command = { type = add_division which = "4. Schutztruppe Division" value = militia } command = { type = add_division which = "5. Schutztruppe Division" value = militia } command = { type = add_division which = "6. Schutztruppe Division" value = militia } command = { type = add_division which = "7. Schutztruppe Division" value = militia } command = { type = add_division which = "8. Schutztruppe Division" value = militia } command = { type = add_division which = "9. Schutztruppe Division" value = militia } command = { type = add_division which = "10. Schutztruppe Division" value = militia } } } La terza quest'altro Codice: event = { id = 1000003 country = U36 name = "La Germania ci affida i nuovissimi Afrikakorps!" date = { day = 0 month = january year = 1919 } deathdate = { day = 0 month = january year = 1960 } picture = afrika_korps style = 1 action_a = { name = "Viva il Kaiser!" command = { type = dissent value = -5 } command = { type = add_division which = "1. Garnison Division" value = garrison } command = { type = add_division which = "2. Garnison Division" value = garrison } command = { type = add_division which = "3. Garnison Division" value = garrison } command = { type = add_division which = "4. Garnison Division" value = garrison } command = { type = add_division which = "1. Afrikakorps Division" value = infantry } command = { type = add_division which = "2. Afrikakorps Division" value = infantry } command = { type = add_division which = "3. Afrikakorps Division" value = infantry } command = { type = add_division which = "4. Afrikakorps Division" value = infantry } command = { type = add_division which = "5. Afrikakorps Division" value = infantry } command = { type = add_division which = "6. Afrikakorps Division" value = infantry } } } Il problema è che qualunque scelta si faccia vengono attivati tutti e 3 gli eventi.. Qualche idea? edit vorrei anche stabilire il modello di fanteria/milizie/presidi, in africa arriva roba del 1870 o giù di lì
rimuovi date/offset/deathdate dagli eventi che devono essere triggerati dal primo evento. Guarda DH\Modding Documentation\event_commands.txt per la sintassi per create nuove divisioni, mi sembra che ci sia un parametro (when = X forse) per scegliere il modello.
Funziona! Codice: type = add_division which = [name] value = [div type] when = model where = [brigade type] # Brigade model is always the latest. If a preceding add_corps command has been used, the division will go to that unit, otherwise to the force pool. Per il modello, non ho capito esattamente cosa devo scrivere al posto di model dopo il when = EDIT ok capito da me when = 1 modello 1870, when = 2 modello 1897 eccetera
Ok ho trasformato gli eventi in decisioni, li ho ampliati/modificati, e aggiunta una decisione sull'investimento civile Codice: event = { id = 1000000 country = U08 name = "La Germania arma le sue colonie" desc = "Il nuovo stato tedesco in Africa è enorme e pressocchè indifeso, il Kaiser intende rinforzare i corpi a difesa dell'Africa" date = { day = 0 month = january year = 1919 } deathdate = { day = 31 month = december year = 1960 } offset = 10 picture = afrika_korps style = 1 decision = { exists = U36 } decision_trigger = { exists = U36 puppet = { country = U36 country = U08 } atwar = no manpower = 10 money = 3000 } trigger = { exists = U36 puppet = { country = U36 country = U08 } atwar = no manpower = 10 money = 3000 } action_a = { name = "Ripristina le vecchie Schutztruppe" ai_chance = 5 command = { type = trigger which = 1000001 } } action_b = { name = "Ripristina e rinforza le Schutztruppe" ai_chance = 50 command = { type = dissent value = 1 } command = { type = manpowerpool value = -10 } command = { type = trigger which = 1000002 } } action_c = { name = "Istituisci l'Afrikakorps" ai_chance = 25 command = { type = dissent value = 3 } command = { type = money value = -3000 } command = { type = manpowerpool value = -10 } command = { type = trigger which = 1000003 } command = { type = relation which = U36 value = 5 } } action_d = { name = "Per la giungla ci vuole la fanteria giusta" ai_chance = 20 command = { type = gain_tech which = 1560 } #blueprint fanteria di marina command = { type = money value = -3000 } command = { type = trigger which = 1000004 } } } Codice: event = { id = 1000001 country = U36 name = "La Germania ci affida il vecchio corpo degli Schutztruppe" picture = afrika_korps style = 1 action_a = { name = "Non basteranno" command = { type = dissent value = -1 which = U36 } command = { type = add_division which = "1. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "2. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "3. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "4. Schutztruppe Division" value = militia when = 3} } } event = { id = 1000002 country = U36 name = "La Germania ci affida in forze le Schutztruppe" picture = afrika_korps style = 1 action_a = { name = "Ringraziamo il Kaiser" command = { type = dissent value = -2 } command = { type = add_division which = "1. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "2. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "3. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "4. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "5. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "6. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "7. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "8. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "9. Schutztruppe Division" value = militia when = 3} command = { type = add_division which = "10. Schutztruppe Division" value = militia when = 3} } } event = { id = 1000003 country = U36 name = "La Germania ci affida gli Afrikakorps" picture = afrika_korps style = 1 action_a = { name = "Viva il Kaiser!" command = { type = dissent value = -5 } command = { type = add_division which = "1. Garnison Division" value = garrison when = 3} command = { type = add_division which = "2. Garnison Division" value = garrison when = 3} command = { type = add_division which = "3. Garnison Division" value = garrison when = 3} command = { type = add_division which = "4. Garnison Division" value = garrison when = 3} command = { type = add_division which = "1. Afrikakorps Division" value = infantry when = 6} command = { type = add_division which = "2. Afrikakorps Division" value = infantry when = 6} command = { type = add_division which = "3. Afrikakorps Division" value = infantry when = 6} command = { type = add_division which = "4. Afrikakorps Division" value = infantry when = 6} command = { type = add_division which = "5. Afrikakorps Division" value = infantry when = 6} command = { type = add_division which = "6. Afrikakorps Division" value = infantry when = 6} } } event = { id = 1000004 country = U36 name = "La Germania sta lavorando a una soluzione innovativa" picture = afrika_korps style = 1 action_a = { name = "OK" } } Codice: event = { id = 1000005 country = U08 date = { day = 0 month = january year = 1919 } deathdate = { day = 31 month = december year = 1960 } offset = 10 decision = { exists = U36 technology = 1560 } decision_trigger = { exists = U36 technology = 1560 puppet = { country = U36 country = U08 } atwar = no manpower = 10 money = 5000 } trigger = { exists = U36 technology = 1560 puppet = { country = U36 country = U08 } atwar = no manpower = 10 money = 5000 } name = "La Fanteria di Marina" desc = "Abbiamo sviluppato un corpo efficacie per l'assalto anfibio e le operazioni nella giungla, le nostre colonie in Africa non aspettavano altro!" picture = afrika_korps style = 1 action_a = { name = "Addestriamo le loro truppe" ai_chance = 80 command = { type = dissent value = 1 } command = { type = money value = -3000 } command = { type = trigger which = 1000006 } command = { type = relation which = U36 value = 10 } } action_b = { name = "Addestriamo nuove truppe" ai_chance = 20 command = { type = dissent value = 3 } command = { type = money value = -5000 } command = { type = manpowerpool value = -10 } command = { type = trigger which = 1000007 } command = { type = relation which = U36 value = 20 } } } Codice: event = { id = 1000006 country = U36 name = "La Germania ci affida truppe eccellenti" picture = afrika_korps style = 1 action_a = { name = "Pochi ma ottimi!" command = { type = dissent value = -4 } command = { type = add_division which = "1. Marine Division" value = marine when = 0} command = { type = add_division which = "2. Marine Division" value = marine when = 0} command = { type = add_division which = "3. Marine Division" value = marine when = 0} command = { type = add_division which = "4. Marine Division" value = marine when = 0} } } event = { id = 1000007 country = U36 name = "La Germania ci affida truppe eccellenti in quantità!" picture = afrika_korps style = 1 action_a = { name = "Ottimo e abbondante!" command = { type = dissent value = -6 } command = { type = add_division which = "1. Marine Division" value = marine when = 0} command = { type = add_division which = "2. Marine Division" value = marine when = 0} command = { type = add_division which = "3. Marine Division" value = marine when = 0} command = { type = add_division which = "4. Marine Division" value = marine when = 0} command = { type = add_division which = "5. Marine Division" value = marine when = 0} command = { type = add_division which = "6. Marine Division" value = marine when = 0} command = { type = add_division which = "7. Marine Division" value = marine when = 0} command = { type = add_division which = "8. Marine Division" value = marine when = 0} command = { type = add_division which = "9. Marine Division" value = marine when = 0} command = { type = add_division which = "10. Marine Division" value = marine when = 0} } } Decisione civile Codice: event = { id = 1000008 country = U08 name = "Programma di investimento civile nelle colonie" desc = "Il nuovo stato tedesco in Africa soffre di carenze strutturali, i giusti investimenti posso fare la differenza" date = { day = 0 month = january year = 1919 } deathdate = { day = 31 month = december year = 1960 } offset = 365 persistent = yes picture = afrika_korps style = 1 decision = { exists = U36 } decision_trigger = { exists = U36 puppet = { country = U36 country = U08 } atwar = no manpower = 30 money = 4000 supplies = 1000 metal = 5000 oil = 5000 energy = 10000 } trigger = { exists = U36 puppet = { country = U36 country = U08 } atwar = no manpower = 10 money = 3000 } action_a = { name = "Miglioriamo le infrastrutture" ai_chance = 60 command = { type = money value = -1000 } command = { type = dissent value = 1 } command = { type = trigger which = 1000009 } } action_b = { name = "Miglioramo le infrastrutture e industrie" ai_chance = 30 command = { type = money value = -3000 } command = { type = dissent value = 3 } command = { type = trigger which = 1000010 } } action_c = { name = "Programma completo di colonizzazione" ai_chance = 10 command = { type = dissent value = -20 } #disoccupati partono per l'africa command = { type = money value = -4000 } command = { type = supplies value = -1000 } command = { type = manpowerpool value = -30 } command = { type = metalpool value = -5000 } command = { type = oilpool value = -5000 } command = { type = energypool value = -10000 } command = { type = trigger which = 1000011 } command = { type = domestic which = free_market value = -1 } } } Codice: event = { id = 1000009 country = U36 name = "La Germania costruisce nuove strade per noi" picture = afrika_korps style = 1 action_a = { command = { type = tc_mod value = 3 }} } event = { id = 1000010 country = U36 name = "La Germania costruisce strade e industrie per noi" picture = afrika_korps style = 1 action_a = { command = { type = tc_mod value = 3 } command = { type = event which = 9000040 where = 909 when = 60 } command = { type = event which = 9000040 where = 909 when = 60 } command = { type = event which = 9000040 where = 909 when = 60 } command = { type = dissent value = -1 } } } event = { id = 1000011 country = U36 name = "La Germania avvia un piano completo di colonizzazione" picture = afrika_korps style = 1 action_a = { command = { type = dissent value = 1 } command = { type = tc_mod value = 3 } command = { type = event which = 9000040 where = 909 when = 60 } command = { type = event which = 9000040 where = 909 when = 60 } command = { type = event which = 9000040 where = 909 when = 60 } command = { type = money value = 1000 } command = { type = supplies value = 1000 } command = { type = manpowerpool value = 30 } command = { type = metalpool value = 5000 } command = { type = oilpool value = 5000 } command = { type = energypool value = 10000 } } } Piccole soddisfazioni
Si , e i messaggi di errore di DH mi hanno aiutato tantissimo, ti riportano la riga esatta dov'è il problema, velocissimo da sistemare!