İleti Sayısı: 26,421
Üyelik Yılı: 2015
Imperium:
139
10-08-2016, 17:51
(Son Düzenleme: 17-05-2018, 00:27, Düzenleyen: Justicar.)
Bu haftaki geliştirici günlüğünde Meneth (Magna Skjaeran) optimizasyon ve modlamadan bahsediyor.
Alıntı:Merhabalar. Ben Magna Skjaeran, şu sıralar Crusader Kings II'de stajyer olarak çalışıyorum. Bazılarınız beni Paradox oyun wikilerinin yöneticisi olara da tanıyacaktır. Stayjerliğim neredeyse sona eriyor, ben de son iş olarak oyunlarda en çok zevk aldığım 2 şeyden bahsedeceğim : optimizasyon ve modlama.
Bildiğiniz üzere Crusader Kings II'de oyun ilerledikçe aynı zamanda da yavaşlıyor. Bu yavaşlamanın ana sebebi oyundaki karakter sayısının artması. Bu yavaşlama özellikle kötü bilgisayara sahip oyuncular için büyük bir sıkıntı sebebi olurken oyunu 5 hızında oynayan herkes rahatlıkla bu yavaşlamayı farkedebilir.
2.6 yamasıyla birlikte oyunun çok daha hızlı olmasını sağlayacak değişikliklerde bulunduk. Yama sonrası oyunun son dönemindeki autosave'ler normalden 2 kat daha hızlı yapılıyordu, aynı zamanda ay sonu yaşanan lag problemi de büyük oranda azaldı. Günlük performans da bu değişikliklerden olumlu etkilendi.
Yaptığımız değişiklikler sonrası oyunumuzun %30 ila %50 oranda hızlandığını söylemek mümkün. Yama öncesi aynı süre diliminde 10 sene oynayacaksanız artık 13 ila 15 sene oynayacaksınız.
Oyunu hızlandırma adına yaptığımız değişiklikler şu şekilde :- Sıkıştırılmamış kayıt dosyaları artık eskisinden daha küçük boyutta.
- Oyunlar artık daha etkili bir şekilde kaydediliyor.
- Yıl sonu yapılan tüm hesaplamalar artık yıl içerisinde belli aralıklarla yapılıyor, dolayısıyla yıl sonu lag olmuyor.
- Haritada performansı yükseltecek geliştirmelerde bulunuldu.
- Oyun içerisindeki işlemci isteyen çeşitli öğelerde optimizasyon yapılarak işlemciyi daha az meşgul etmesi sağlandı.
- Singlethread olarak yapılan bir çok işlem artık multithread olarak gerçekleştiriliyor.
- Artık eskisine nazaran çok daha az rastgele karakterler ortaya çıkıyor ve oyun gereksiz karakterleri ortadan kaldırmaya daha meyilli.
Oyunu geliştirme hususunda geldiğimiz noktayı aşağıdaki grafikte daha iyi görebilirsiniz.
2.5 için benzer bir grafiğe sahip değiliz ancak 769 yılında başlanmış ve 400 sene oynanmış bir kayıt dosyasında oyun sonunda 30 bin karaktere sahiptik, yukarıdaki grafikte ise 16 bin karaktere sahibiz.
Son olarak aşağıdaki videoda 2.5.2 ila 2.6 arasındaki farkı daha iyi görebilirsiniz :
Şimdi modlamaya geçelim :
Ben eskiden Crusader Kings 2 modları yapıyordum üzerinde çalıştığım modlardan bir tanesi de birçok Crusader Kings 2 oyuncusunun favori modu olan Historical Immersion Project, dolayısıyla modlama konusu benim oldukça hoşlandığım konulardan bir tanesi.
Modcuların bir çok zaman normalde rahatlıkla yapılabilecek bir iş için uzun süre çaba sarfedip zor yollarla o işi yapmaya çalıştığını biliyorum. Bu hususun ana sebebi bilginin kolay erişebilir olmaması. Bu sebeple çok sayıda trigger ve effect oluşturdum. Bu trigger ve efectlere biz PDS'te genel olarak ihtiyaç duymuyoruz ancak ihtiyaç duyacak modcular olabilir. Aynı zamanda modlarla ilgili çok sayıda bug giderildi ve yeni konsol komutları oyuna eklendi.
Mod değişiklikleri yaklaşık 100 maddeden daha fazlasına sahip, bu değişiklikleri aşağıda inceleyebilirsiniz.
- Added possibility to have major province modifiers
- Causes of death can now be customized
- Execution method can be chosen via a priority system similar to government flavors
- added "health_penalty", "fertility_penalty", "martial_penalty", "intrigue_penalty", "diplomacy_penalty", "stewardship_penalty", "learning_penalty"
- a set of modifiers whose sum for a given stat can never be positive (allows your giving bonuses that only offset maluses instead of bonus that are positive no matter what)
- Added military_techpoints, economy_techpoints, culture_techpoints as generic modifiers (for province modifiers)
- Added "any_demesne_province" as an effect
- holdings/settlement modifiers can now be hidden
- Added "has_any_symptom" and "symptom=" triggers
- Added "num_of_symptoms" trigger
- Added "spawn_disease" effect which spawns a specific disease in a specific province
- Scope must be a province
- "spawn_disease=disease_name"
- Added "start_outbreak" which forces an outbreak, but follows the scenarios set up in the disease.txt file
- "start_outbreak=disease_name"
- Scope is not used
- Added "on_outbreak" OnAction which is called when a new outbreak starts
- scope is the province where the outbreak starts
- token_data is the disease name
- Added "scenarios" to diseases: they exclude certain regions and determine possible starting provinces
- Added various defines for modifiers to contagiousness of disease when determining the spread. They are only used with The Reaper's Due DLC
- Added yearly "on_province_major_modifier" on_action
- Added "regional_percentage" trigger:
regional_percentage = {
region = andalusia
percentage = 0.5
has_province_flag = aztec_explorers
}
- Added hospital_level trigger that tests the hospital level in a province. Province scope
- Added disease_defence trigger that tests the disease defense in a province. Province scope
- Added "has_game_rule" trigger to test the value of a game rule:
has_game_rule = {
name = gender
value = all
}
- Added triggers:
any_hospital
num_of_hospitals
num_of_hospitals_diff
has_hospital
hospital_has_any_building
is_hospital_decision_allowed
is_hospital_decision_potential
- Added Event scope:
hospital_owner
- Added supported_checksum = yes/no trigger. Added supported_checksums = { ABCD EFGH } field in .mod files. When supported_checksum trigger is used in game it tries to match the current checksum of the game with the entries in all active mods mod-files. The trigger returns true if it finds at least one match.
- Fixed an issue for mods trying to remove localisation from the base game's localisation.
- targeted_decisions, is_targeted_decision_allowed and is_targeted_decision_potential are now considered aliases for targetted_decisions, is_targetted_decision_allowed and is_targetted_decision_potential respectively and are evaluated in the same way.
- Fixed a CTD that could happen for mods that allowed you to play characters with only titular titles.
- scaled_wealth and transfer_scaled_wealth now supports an additional max field to cap the maximum amount of wealth gained/lost.
- Added enatic trait attribute equivalent of the agnatic attribute (which allowed certain traits, eg Sayyid, to always be inherited from the father).
- Added define MERCHANT_REPUBLIC_MAX_PATRICIANS which determines the amount of merchant republic families the game will allow to exist in a merchant republic.
- Added triggers monthly_prestige and monthly_piety.
- Added effects scaled_prestige and scaled_piety.
- It is now possible to script council voting for targeted_decisions.
- The council interface should now support voter minor titles with a grant limit higher than one (1).
- Added set_pentarch_title = <title/none> effect.
- The pentarchy entry in landed titles can now be assigned to a specific religion rather than all religions with autocephaly.
- Using title_prefix in a government definition should no longer default all non-prefix defined title names to the default versions.
- Ambitions are now valid for the ai aggression modifier "aggression".
- add_character_modifier and add_holding_modifier now supports the stacking = yes parameter.
- Added has_holding_modifier = x trigger that returns true of the holding has modifier x.
- Added has_instances_of_character_modifier, has_instances_of_province_modifier, has_instances_of_holding_modifier = { modifier = x amount = y } trigger where y is the amount of current applications of modifier x that the character needs to currently hold for the trigger to return true.
- Added remove_character_modifiers, remove_province_modifiers, remove_holding_modifiers = { modifier = x amount = y } effects that removes y amount of modifier x from the current scope.
- Added on_trade_post_construction_completed, on_fort_construction_completed on_action entries.
- Added on_trade_post_construction_start, on_fort_construction_start on action entries.
- Fixed some issues with on_settlement_construction_start on_action events.
- Added GetHusbandWifeCap, GetHusbandWifeCapOpp, GetMasterMistressCap, GetMasterMistressOpp, GetMasterMistressCapOpp character localisation functions.
- any_character trigger should no longer exclude the ROOT scope in it's evaluation.
- Fixed a possible issue with hidden effects inside scripted effects.
- Added trigger 'leader_traits' (number of)
- Reactivated the on_action 'on_focus_pulse'
- Disease effects are now customizable through script per disease
- Silk Road modifier icon can now be set in the text file
- Added define AUTOMATICALLY_ACCEPTS_COALITION_CALLS to determine if defensive pacts members automatically join at the start of wars
- Converted the Family Focus events to on_action events
- Fixed a bug where the 'end_war' effect would incorrectly invalidate wars
- The 'regent' event target is now properly invalidated if there is no regent
- Added trigger 'any_player'
- Added effect 'any_player'
- Added effect 'random_player'
- Added define WAR_CONTRIBUTION_THEOCRACY_GHW_MULT
- Fixed era bookmarks ignoring their defined text keys. WARNING: This means that your mod's era names are likely now unlocalised
- Fixed buttons F9 through F12 not working as shortcuts
- Fixed a number of triggers functioning identically when set to "= no" as when set to "= yes"
- has_terrain_specialization now takes "yes" and "no" as parameters as well, in addition to "any" and specific terrains
- Added missing localisation for a handful of triggers
- Era screen characters can now be restricted based on dlc by adding 'dlc = "dlc name"' to their entry
- Fixed the time control buttons being inactive in 867.1.1 in mods starting on or before that date
- Opinion modifiers can now be scripted to be stacking (default) or not
- Added a give_birth console command (requires existing pregnancy; use pollinate/cuckoo to impregnate)
- Added on_action 'on_holding_building_start'
- Added has_assigned_minor_title trigger. Usage: "has_assigned_minor_title = title_master_of_the_horse" or "has_assigned_minor_title = { title = title_commander count = 2 }"
- Added has_children and has_living_children triggers
- The "loot" trigger will no longer crash the game if applied to a land unit. It will always return false for land units, but it won't crash
- has_minor_title now also accepts "yes" and "no", to check whether the character holds any minor titles at all
- Can now add and destroying buildings in extra holdings (trade posts, forts & hospitals) with the following effects:
add_to_extra_holding = {
type = hospital
building = leper_colony_1
}
destroy_in_extra_holding = {
type = hospital
building = leper_colony_1
}
- The following effects have been added. They work the same as the equivalent for forts or trade posts:
create_hospital
destroy_hospital
any_hospital
- Scripted effects in event options will now show the traits and characters they affect
- Added a war_participation trigger. Example: any_war = { war_participation = { who = ROOT score = 0.5 } }
- Added an is_landed_title_allowed trigger, which checks whether a character fulfills the "allow" section of a specific title. Example: is_landed_title_allowed = e_hre or is_landed_title_allowed = ROOT, where ROOT is a title
- Added a "force_host" effect that forcibly changes the host a character. Scope should be the character being moved, target should be the character's new host.
Shouldn't be used lightly
force_host = ROOT
- Added join_faction, leave_faction and start_faction effects.
- Added faction_exists trigger.
- Added export_to_variable effect.
- Added while effect.
- Title prefix defined in landed_titles.txt should now support localisation variations dependent on the holder of the title.
- Added sound_effect effect.
- It should now be possible to make baronies independent through history editing.
- Added a "character_stats" console command that prints a variety of statistics to the console, such as the # of rulers of each tier, gender breakdown, and total wealth. This also gets written to stats.log
- Added a "dynasty_stats" console command that prints a variety of statistics to the console, such as the # of dynasties, number of single-person dynasties, and number of dynasties with only dead characters. This also gets written to stats.log
- Added a COURT_PRUNE_SIZE define, which defines when the game will try to find unneeded courtiers to kill off. Lowered to 10 from the original 20
- Added a "de_facto_liege_title" trigger, which checks that the defacto liege title of a character or title is the right-hand side. Example: ROOT = { de_facto_liege_title = e_hre }. Both sides can take a character or a title. If a character is provided, their primary title will be used. A defacto_liege_title scope already existed, but this should make some operations easier
- Added an "immortal" trigger, which checks if the character in the current scope is immortal
- Added an "is_incapable" trigger, which checks if the character in the current scope has an incapacitating trait
- Added an "is_pilgrim" trigger, which checks if the character in the current scope has a pilgrim trait
- Added a "same_regnal_name" trigger, which checks if the character in the current scope has the same regnal name as another character, meaning that they'll be considered the same name for the purpose of regnal numbering. Regnal names are currently defined as having the same first first name (E.G., "Gustav" and "Gustav Adolf" are the same regnal name), or the same cultural first first name (E.G., "Alfr_Alf" and "Alf_Alf" are the same regnal name)
- "monthly_income" and "yearly_income" can now be used in a holding scope. Before it could only take a character. Example: "b_constantinople = { yearly_income = 15 }"
- Added a "has_inheritance_blocker" trigger, which checks if the character in the current scope has a trait that blocks inheritance (cannot_inherit = yes)
- Added a "dynastic_prestige" trigger, which checks if the dynasty of the character in the current scope has a prestige of at least the given value. Example: "dynastic_prestige = 100"
- Added a "set_preferred_capital" effect, which sets the preferred capital of the title in the current scope (used for a variety of things, such as the AI to determine where to put their capital). Only works for dynamic titles, as static titles base their capital off of the landed_titles folder
- Added a "lacks_dlc" event pre-trigger. If the DLC is enabled, the event will not be evaluated
- Added a "has_dlc" event pre-trigger. If the DLC is disabled, the event will not be evaluated
- Added a "war" event pre-trigger, which takes "yes" or "no", and checks that the character is/isn't at war
- Added a "is_married" event pre-trigger, which takes "yes" or "no", and checks that the character is/isn't married
- Added a "friends" event pre-trigger, which takes "yes" or "no", and checks that the character does/doesn't have friends
- Added a "rivals" event pre-trigger, which takes "yes" or "no", and checks that the character does/doesn't have rivals
- Added a "has_global_flag" event pre-trigger, which checks that the given global flag has been set
- Added support for an after = { } - effect field in events. It works as a counterpart to immediate and executes after any option is executed.
- Replaced the COALITION_PROVINCE_THREAT_RATIO define with COALITION_SCARY_TROOP_STRENGTH_THREAT_RATIO. It is now actually used by the game
- Decisions now take the pre-triggers "only_rulers", "only_landed", and "only_independent". It is recommended that they be used when possible so as to reduce the time spent by the AI evaluating the decision. Note that the pre-trigger currently only applies to the AI, not to the player
- The "is_occupied" trigger now works in province scope, not just title scope
- The "is_occupied" trigger now works for county-level titles, not just baron-level titles
- "plot_decisions" are now only checked by characters that lead a plot or faction. Previously there was no functional difference between plot decisions and regular decisions
- Added "has_flag" as a quick trigger for province events. It works exactly like the "has_character_flag" quicktrigger, except the scope is the province for the event
- Added on_war_ended_invalid and on_crusade_invalid on_actions, that provide the same scopes as the other on_war_ended and on_crusade on_actions
- Added a CROWN_LAW_CHANGE_TIMER define. If set to 0, rulers will be restricted to MAX_CROWN_LAW_CHANGES. If set to 1, they'll have a CROWN_LAW_CHANGE_MONTHS cooldown
- Added a CROWN_LAW_CHANGE_MONTHS define
- Traits can now be hidden. Adding "hidden = yes" will make it invisible in all parts of the UI (except event options, where they can be hidden using hidden_tooltip)
- Added define "FAR_CRUSADES_WITHOUT_WEIGHT_MODIFIER" as a weight modifier to starting crusades on titles that are not adjacent to territory of our religion and don't have a crusade weight modifier. Default value is 75%
Modcuların hoşuna gidecek şeylerden bir tanesi daha önceki geliştirici günlüklerinde bahsettiğimiz özelliklerden biri olan oyun ayarları ekranı.
Artık oyuna istediğiniz ayarı modlayarak ekleyebiliyorsunuz, bu ayarların etkili olması için artık oyuna ilk gün karşınıza çıkacak bir event eklemenize gerek yok. İstediğiniz kadar oyun ayarı ekleyebilir bu oyun ayarlarına istediğiniz kadar seçenek verebilirsiniz.
The Reaper's Due ve beraberindeki 2.6 yaması 25 Ağustosta çıkacak.
Aşağıdaki 1 üye Duman nickli üyenin bu iletisini beğendi:1 üye Duman nickli üyenin bu iletisini beğendi.
• Lothebork
İleti Sayısı: 762
Üyelik Yılı: 2015
Imperium:
3
Optimizasyon harika olacak.
Vir sapit qui pauca loquitur
•
İleti Sayısı: 3,091
Üyelik Yılı: 2015
Imperium:
36
Bütün oyunlarının ihtiyacı olan bir şey optimizasyon. EU4'te ileri tarihlerde aşırı kasmalar yaşanabiliryor ki baya iyi bir bilgisayara sahibim.
•
İleti Sayısı: 357
Üyelik Yılı: 2016
Imperium:
1
15-08-2016, 20:17
(Son Düzenleme: 15-08-2016, 20:17, Düzenleyen: Raider41.)
Sonunda BE oyunda en çok rahatsız olduğum şeydi
•
İleti Sayısı: 2,160
Üyelik Yılı: 2015
Imperium:
28
Bu optimizasyon olayını diğer oyunlara da getirsinler madem.
•
|