Total War: SHOGUN 2

Total War: SHOGUN 2

View Stats:
House of Rahl May 26, 2015 @ 11:34pm
Great Guard Mod Request
i have in the past, and successfully to an extent might i add added a duplicate unit of great guard, trainable basically immediately, but adding a unit messed up the whole space time continuum and bows sounds like guns, guns like bows it was horrible i deleted my mod and counted it a failure.

my request: can anyone create a simple mod that changes the requirements of the great guard to no longer need the shogunate seat. i want EVERYONE able to field 2 of these suckers. if u could also add the nihon maru to it and make it available without being shogun that would be great, but my main focus is the great guard. id prefer if it wasnt a duplicate unit like i tried before so it doesnt cause the destruction of the known universe. just edit away the requirement of shogun wherever that is in the db tables.

Edit: forgot to mention it will have to be 2 units for the great guard and 2 for the nihon maru, the takeda have a unique great guard, and the mori have a unique nihon maru.
Last edited by House of Rahl; May 26, 2015 @ 11:58pm
< >
Showing 1-15 of 24 comments
House of Rahl May 27, 2015 @ 12:22am 
the closest ive come to finding it is {unit_tables: units} it shows that the great guard require "SHO_Yari_2_Naginata_Dojo" but the great guard MP (multiplayer) and Takeda great guard both dont have that as an additional building level requirement. all three require "res_sho_horses" which is just the tradable resource warhorses. beyond that i see no reference of shogun or leader or w/e title/status that i can delete.

under {unit_stats_land_tables: unit_stats_land} i can modify the great guard to basically have whatever stats i want but dont see any options to change its "building requirements of shogun status" or even tell if what additional buildings it needs like a tier 3 stable.

the final table i see great guard mentioned is the {unit_to_exclusive_faction_permissions_tables: units_to_exclusive_factions_permissions} table. it shows under cav that takeda are "allowed" to have great guard but not takeda great guard, and they are the only faction listed with great guard in it. the takeda great guard is unchecked and presumably noone is allowed to use it. this particular table really throws me off cause for example cav_spear_yari_cavalry is un-allowed in faction takeda. it makes me think maybe there is a standard list of units that are allowed to everyone and this is a list that takes the general list and u set a faction and turn off the allowed units then add faction specific units. right bellow that yari spear unit is the takeda yari spear with the takeda faction and allowed is checked. perhaps this is the table i need? i hope so but its far too late to do any more digging in these tables.

if this final table does in fact enable and disable the use of certain units in a campaign by certain factions i could use it to make the date able to use chosokabe archers and normal archers or disable normal archers and just use the chosokabe, but nowhere in here do i see the ability to edit the criteria for requiting a unit. in the end any faction to my knowledge already has the ability to use great guard so long as they take the shogun seat so then..... i dont think this table will be the one to solve my problems...... blast it all
Last edited by House of Rahl; May 27, 2015 @ 12:35am
uanime5 May 27, 2015 @ 4:00pm 
The units_to_exclusive_faction_permissions is just to give playable factions unique units. Basically it disabled the vanilla version and gives them the unique version. The bulk of the units are listed in the units_to_groupings_military_permissions. Each faction is assigned a group and the group contains most of the units.

If you edit the japan military group in the units_to_groupings_military_permissions you would be able to give all Japanese factions Chosokabe archers and the Takeda Great Guard.

I haven't come across a DB table that mentions the Shogunate. Though in the data.pack/campaigns/jap_shogun I came across the scripting.lua (can be opens in notepad). This file contains several scripts used during the game; one of which mentions the Great Guard, Nihon Maru, and becoming Shogun. If you delete this script it may be possible for any faction to recruit these units.
Last edited by uanime5; May 27, 2015 @ 4:20pm
House of Rahl May 27, 2015 @ 4:10pm 
i did see the grouping military permissions, great guard and nihon maru are both in the japan military group in that table.
uanime5 May 27, 2015 @ 4:21pm 
Try changing great guard to great guard takeda and see if this makes a difference.
House of Rahl May 27, 2015 @ 4:29pm 
i dont even see the takeda great guard and mori nihon maru. i could add them to the bottom of the line though. im about to go through all the campaign ones to find that one u were talking about. i told it to just open all .pack files to make it easier to find this thing.
House of Rahl May 27, 2015 @ 4:55pm 
{building_units_allowed} state the great guard can only be built by a tier 3 and 4 stable (bajutsu dojo, legendary bajutsu dojo)
also nihon maru can only be built from a tier 4 port (drydock)
uanime5 May 27, 2015 @ 5:48pm 
You could have the great guard be available at an earlier level so it's easier to tell whether you can recruit it or not.

House of Rahl May 27, 2015 @ 6:55pm 
where can i find data.pack/campaigns/jap_shogun? i could data.pack in the total war shogun file under steam inside the data folder. but i cant find the file path you described. ive been searching through the DB section of the pack file manager looking for anything else that mentions great guard found a few things but nothing that i think will eliminate the "shogun title/seat".

also wouldnt it break the game if we delete the ability to become shogun at all. i mean you cant win campaign without that ability.
Last edited by House of Rahl; May 27, 2015 @ 7:15pm
House of Rahl May 27, 2015 @ 7:29pm 
ok after searching threw the pack file manager i found the ♥♥♥ shogun scripting.lua that you mentioned. im still not sure how to access it or where it is in the actually C drive though. i opened it by telling pack file manager to open all pack files. it has two lines of code in the front that seem to limit the great guard and nihon maru.

scripting.game_interface:add_restricted_unit_record("Cav_Spear_Great_Guard_Takeda")
scripting.game_interface:add_restricted_unit_record("Heavy_Ship_Nihon_Maru_Mori")

both of those lines though seem to be talking about the class specific versions the takeda specific great guard and the mori specific nihon maru.

further down there is a sectioned titles BECOMING SHOGUN, it looks like thats where the great guard and nihon maru are set to active or usable. but if we delete that its not like the code is also setting them unusable that would just delete the ability to ever get those units even if i do become shogun. somewhere else the units are set to inactive or unusable or something.
uanime5 May 28, 2015 @ 9:04am 
You missed the part further down that mentioned these units. Here it is in full:

-------------------------------------------------------------------------------------------------------------------------
--
-- BECOMING SHOGUN
--

-- context.string is used to retreive the event context faction, in this case the clan who has assumed control of the shogunate.
-- Use in place of the usual "faction_key" to avoid having to make a shedload of script duplicates.

local current_shogun = "ashikaga"
local previous_shogun = "ashikaga"
local human_shogun = ""
local BOOL_ashikaga_hate_player = false

local function OnFactionBecomesShogun(context)
out.ting (context.string .. " became shogun.")

current_shogun = context.string

out.ting("The outgoing shogun is the " .. previous_shogun)

if conditions.FactionIsHuman(current_shogun, context) then
out.ting("Spawning Great Guard and Nihon Maru for the " .. current_shogun)
scripting.game_interface:create_force(--[FACTION]--
current_shogun,
--[SPECIFIC ARMY LIST]--
"Cav_Spear_Great_Guard,Cav_Spear_Yari_Cavalry,Cav_Spear_Yari_Cavalry",
--[COORDINATES]--
-44.0, -124.0,
--[ID]--
"Great Guard",
--[USE_COMMAND_QUEUE]--
true)

scripting.game_interface:create_force(--[FACTION]--
current_shogun,
--[SPECIFIC ARMY LIST]--
"Heavy_Ship_Nihon_Maru,Light_Ship_Bow_Kobaya,Light_Ship_Bow_Kobaya",
--[COORDINATES]--
-64.0, -130.5,
--[ID]--
"Epic Ship",
--[USE_COMMAND_QUEUE]--
true)

out.ting("Giving the shogun effect bundle to the " .. current_shogun)
scripting.game_interface:apply_effect_bundle("s_shogun_effects", current_shogun, 0)
human_shogun = current_shogun
out.ting("Human shogun: " .. human_shogun)


end

out.ting("Taking away the shogun effect bundle from the " .. previous_shogun)
scripting.game_interface:remove_effect_bundle("s_shogun_effects", previous_shogun)

previous_shogun = current_shogun

out.ting("Therefore! current_shogun = " .. current_shogun .. " previous_shogun = " .. VAR_previous_shogun_ID .. ", " .. previous_shogun)
end


-------------------------------------------------------------------------------------------------------------------------
uanime5 May 28, 2015 @ 9:19am 
The s_shogun_effects part refers to the effect_bundles_to_effects_junctions DB table. In this DB table it mentions the following effects:

shogun_null_effect_great_guard
shogun_null_effect_nihon_maru

In the DB table effects it mentions that these effects are needed in order to recruit these units. However I cannot find a DB table where this effect is assigned to a unit. It's not in the effect_bonus_value_unit_record_junctions.

If you add the shogun_null_effect_great_guard and shogun_null_effect_nihon_maru effects to the playable factions effect bundles then all the playable factions will automatically have access to this unit. As bundles are added via the startpos it will be difficult to create a new bundle, then give it to all the other factions.

You could also recode the script in the scripting.lua so that it automatically gives every faction access to this effect bundle or any other such bundle.
House of Rahl May 28, 2015 @ 9:40am 
im sorry uanime but the last time i did coding was visual basic and that was like 8 years ago. i got lost about 1/3 through reading that. i can see that its preforming checks to see who is shogun and it looks like its using something similar to an (if, then, else) statement to verify who has the shogunate and who it should give access of these units to. im just failing to see where it initially turns off the access, or what you meant about adding shogun_null_effect to the DB table.
uanime5 May 28, 2015 @ 1:55pm 
If you change the line below so it affects all faction, rather than just the Shogun faction, all factions will have access to the great guard. I know you have to change the current_shogun part but I'm not sure what you need to change it to.

scripting.game_interface:apply_effect_bundle("s_shogun_effects", current_shogun, 0)


Alternatively you can edit the effect_bundles_to_effects_junctions by adding the following effects to the bundles for all playable factions (such as t_chosokabe and t_mori):

shogun_null_effect_great_guard 0
shogun_null_effect_nihon_maru 0

This way all playable factions have access to these units.
House of Rahl May 29, 2015 @ 12:56am 
ok i added all the playable factions in {effect_bundles_to_effects_junctions} 2 lines each, "shogun_null_effect_great_guard" and the nihon maru version as well. setup exactly as the s_shogun set of values. i then went onto {building_units_allowed} to add great guard to the tier 1 and 2 stables as well as adding table {unit_tables: units} to remove the naginata dojo from the requirements as well. i played two different runs on two different clans and got both to tier 3 stables each just to be sure. great guard never appeared. it looks like "shogun_null_effect_great_guard" 0, doesnt enable the use of great guard im heading to bed but i might give "shogun_null_effect_great_guard" 1, a go in the morning in the hopes 0 is disable and 1 will be enable.
HerroHerro Oct 5, 2015 @ 8:56pm 
I'm so sorry, that I am so late in putting my information now on how to enable Great Guard and Takeda Great Guard units as well as Nihon Maru and Mori Nihon Maru without limits.

Go to campaigns->jap_shogun->scripting.lua and change "scripting.game_interface:add_restricted_unit_record("Cav_Spear_Great_Guard_Takeda") " to "scripting.game_interface:add_enabled_unit_record("Cav_Spear_Great_Guard_Takeda") " as well to the Nihon Maru line. This is just to ENSURE that it is allow though. I have personally been able to enable Takeda Great Guard for the Takeda clan for myself without having to make sure the script lines said enabled on both the expanded japan mod and the base data pack.

You can simply make it seem as if the units are enabled creating a mod with or without MMS 1.3( for convenience) such as "Takeda_Mod" by going to

building_units_allowed and set the stable chains according and set it to "enable" if you're picky.

unit_required_technology_junctions_tables and assigning a military art to the unit so they can be allowed or "studied" and be trained at the respective unit's building.

unit_stats_land to change any inconsistencies( because since it wasn't SUPPOSED to be enabled by the developers, you may need to search through it stats so it doesn't fook up in game and you can change your preference on the stats that Oban units should have ^_^)

unit_to_unit_abilities_junction if you don't want a lame Oban unit that does nothing basically.

units_tables so as to remove the unit limit restriction ( to facilitate the reason behind enabling it) the absurd costs for two available units only and to fix any problems at the end of the page.

This is actually important lol.

In units_to_exclusive_faction_permissions_tables you have to set the NORMAL(Great Guard) to false and Takeda Great Guard to True on Takeda faction. Do the same for the Mori Nihon Maru on the Mori faction and normal Nihon Maru for other factions.

Last but not least(stupid joke) you can set unit qualities and allow other AI players to enable them and build them as well. I have personally forsaken these unit qualities (as I am bad at balancing them out decently) so I get these really hard to beat AI with REALLY cheap units.
< >
Showing 1-15 of 24 comments
Per page: 1530 50

Date Posted: May 26, 2015 @ 11:34pm
Posts: 24