Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archive

The Original Forum. Game archives, full of resources. How to open them? Get help here.
BobDoleOwndU
advanced
Posts: 68
Joined: Thu Dec 24, 2015 7:45 am
Has thanked: 10 times
Been thanked: 10 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by BobDoleOwndU »

Tex wrote:You need call TppEquip.RequestLoadToEquipMissionBlock at some point during load with a table that includes the equipId, ie
TppEquip.RequestLoadToEquipMissionBlock{TppEquip.EQP_WP_SkullFace_hg_010}

The gun isn't set up as a viable weapon - it's a one shot kill, in pistol slot, and the holding animation looks janky - which is why I never added it as a feature, and never got round to looking in detail at weapon definitions, nasanhak and unknown123 have done more on that.
Thanks! That did it.

You're right though, it's hilariously broken. You can't even reload it.
Gh0stBlade
Moderator
Posts: 719
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 496 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by Gh0stBlade »

Hi, just a friendly reminder. Please do not double post as you may risk being subjected to warnings and/or bans from this forum. Posting once then posting again a few minutes later is absolutely unacceptable, if a day passed and you're adding extremely useful information then I'll let that slide, but please get used to editing posts and be sensible.

If I have to come and clean this thread again, it will be temporarily locked.
Cheers.

Edit: Warnings handed out.
Edit 2: Since there's so much to clean up. Thread will be locked for the next 24 hours.
Edit 3: Hi, thread has been cleaned up. There's at least 6 pages less as I have now cleaned up various double, triple, quad posts and merged them into single posts.
Click the thanks button if I helped!
unknown123
advanced
Posts: 75
Joined: Sat Apr 09, 2016 5:36 pm
Has thanked: 4 times
Been thanked: 13 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by unknown123 »

Tex wrote:You need call TppEquip.RequestLoadToEquipMissionBlock at some point during load with a table that includes the equipId, ie
TppEquip.RequestLoadToEquipMissionBlock{TppEquip.EQP_WP_SkullFace_hg_010}
There are at least 2 workarounds.

The first one is the easiest one - add more weapons to the weapons table. https://github.com/unknown321/mgsv_rese ... ubsistence - good_subsistence+guns will allow you to develop and equip honey bee, training rifle and skullfaces shotgun, as well as 'None' slots as primary and secondary weapon - no more forced equip changes via lua. It works in a fun way, I'll try to explain it further in a separate article when I have time. You can just run a diff between my files and original ones, that alone should give you rough idea of what's happening. However there may be overlapping issues when konami adds more stuff, idk what happens then.

Second workaround is to call lua function to drop a supply box with a weaponId you need (still need to wait for a box to land). Boxes are free btw.

Third one is to add weapon to enemy weapon table then just grab it out of their hands (long way, never used it, I think it was in some of infheaven videos). Or even better, call TppPickable.DropItem or whatever it was, that one function that drops briefcase with blueprint from blown helicopter in mission with weapons dealer. It is also used in IH for dropping supplies from soldiers.

http://i.imgur.com/hrPzCHU.jpg - empty slots.
nasanhak
advanced
Posts: 71
Joined: Sat Nov 28, 2015 6:01 am
Has thanked: 10 times
Been thanked: 4 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by nasanhak »

unknown123 wrote: The first one is the easiest one - add more weapons to the weapons table. https://github.com/unknown321/mgsv_rese ... ubsistence - good_subsistence+guns will allow you to develop and equip honey bee, training rifle and skullfaces shotgun, as well as 'None' slots as primary and secondary weapon - no more forced equip changes via lua.
Have known about how the files affect the development page/weapon sections/dev build trees. Always thought about trying EQP_None but never got around to it. Your post kept me up all night. It works but there are flaws and it's not as perfect as *I* would like it to be, though no doubt it is sufficient.

First, icons are broken, not supplying an icon sets the last used gun's icon. Next the customize page lists the None slot lol. Plus it has stats for some reason. Maybe if all the stats files were tweaked as well, and if you could stop the weapon from being loaded where ever the weapons are assigned for customize tab, then this approach may very well work as a final method.

But still don't know where a weapon is decided to be customizable or not - would like to see Miraz, water pistol etc put through it.

Third issue is that when using DD Staff and the Handgun slot, the ammo count shows up in the slot as 0/0. While the slot is completely missing for Snake, only the Arm slot is available. Probably the result of a confused approach to HUD menus.

Although, with this modding, the game automatically selects the None slot on opening the PRIMARY_HIP/HANDGUN/SMG tabs, this is interesting because it works similar to PRIMARY_BACK in this regard, meaning the menus are configured to select the EQP_None slot by default.

Plus this code works as well, don't even have to develop - it would be good idea to assign a dummy slot icon however! Anybody trying, add at end of respective file.

Code: Select all

--DEV file
TppMotherBaseManagement.RegCstDev{
        p00=900,
	p01=TppEquip.EQP_None,
	p02=TppMbDev.EQP_DEV_TYPE_Handgun,
	p03=0,
	p04=0,
	p05=65535,
	p06="",
	p07="",
	p08="",
	p09=65535,
	p10="",
	p30="",
	p31=0,
	p32=0,
	p33=0,
	p34=0,
	p35=0,
	p36=0
}
TppMotherBaseManagement.RegCstDev{
        p00=901,
	p01=TppEquip.EQP_None,
	p02=TppMbDev.EQP_DEV_TYPE_Assault,
	p03=0,
	p04=0,
	p05=65535,
	p06="",
	p07="",
	p08="",
	p09=65535,
	p10="",
	p30="",
	p31=0,
	p32=0,
	p33=0,
	p34=0,
	p35=0,
	p36=0
}
TppMotherBaseManagement.RegCstDev{
        p00=902,
	p01=TppEquip.EQP_None,
	p02=TppMbDev.EQP_DEV_TYPE_Shotgun,
	p03=0,
	p04=0,
	p05=65535,
	p06="",
	p07="",
	p08="",
	p09=65535,
	p10="",
	p30="",
	p31=0,
	p32=0,
	p33=0,
	p34=0,
	p35=0,
	p36=0
}
TppMotherBaseManagement.RegCstDev{
        p00=903,
	p01=TppEquip.EQP_None,
	p02=TppMbDev.EQP_DEV_TYPE_GrenadeLauncher,
	p03=0,
	p04=0,
	p05=65535,
	p06="",
	p07="",
	p08="",
	p09=65535,
	p10="",
	p30="",
	p31=0,
	p32=0,
	p33=0,
	p34=0,
	p35=0,
	p36=0
}
TppMotherBaseManagement.RegCstDev{
        p00=904,
	p01=TppEquip.EQP_None,
	p02=TppMbDev.EQP_DEV_TYPE_Submachinegun,
	p03=0,
	p04=0,
	p05=65535,
	p06="",
	p07="",
	p08="",
	p09=65535,
	p10="",
	p30="",
	p31=0,
	p32=0,
	p33=0,
	p34=0,
	p35=0,
	p36=0
}

--FLOW file
TppMotherBaseManagement.RegFlwDev{
  p50=876,
	p51=0,
	p52=0,
	p53=0,
	p54=0,
	p55=0,
	p56=0,
	p57=0,
	p58="",
	p59=0,
	p60="",
	p61=0,
	p62=0,
	p63=0,
	p64=0,
	p65="",
	p66=0,
	p67="",
	p68=0,
	p69=0,
	p70=0,
	p71=0,
	p72=0,
	p73=0,
	p74=0
}
TppMotherBaseManagement.RegFlwDev{
  p50=877,
	p51=0,
	p52=0,
	p53=0,
	p54=0,
	p55=0,
	p56=0,
	p57=0,
	p58="",
	p59=0,
	p60="",
	p61=0,
	p62=0,
	p63=0,
	p64=0,
	p65="",
	p66=0,
	p67="",
	p68=0,
	p69=0,
	p70=0,
	p71=0,
	p72=0,
	p73=0,
	p74=0
}
TppMotherBaseManagement.RegFlwDev{
  p50=878,
	p51=0,
	p52=0,
	p53=0,
	p54=0,
	p55=0,
	p56=0,
	p57=0,
	p58="",
	p59=0,
	p60="",
	p61=0,
	p62=0,
	p63=0,
	p64=0,
	p65="",
	p66=0,
	p67="",
	p68=0,
	p69=0,
	p70=0,
	p71=0,
	p72=0,
	p73=0,
	p74=0
}
TppMotherBaseManagement.RegFlwDev{
  p50=879,
	p51=0,
	p52=0,
	p53=0,
	p54=0,
	p55=0,
	p56=0,
	p57=0,
	p58="",
	p59=0,
	p60="",
	p61=0,
	p62=0,
	p63=0,
	p64=0,
	p65="",
	p66=0,
	p67="",
	p68=0,
	p69=0,
	p70=0,
	p71=0,
	p72=0,
	p73=0,
	p74=0
}
TppMotherBaseManagement.RegFlwDev{
  p50=880,
	p51=0,
	p52=0,
	p53=0,
	p54=0,
	p55=0,
	p56=0,
	p57=0,
	p58="",
	p59=0,
	p60="",
	p61=0,
	p62=0,
	p63=0,
	p64=0,
	p65="",
	p66=0,
	p67="",
	p68=0,
	p69=0,
	p70=0,
	p71=0,
	p72=0,
	p73=0,
	p74=0
}
At this point I really don't know why Konami just won't add in this feature as a default. Am gonna write them a letter. Also how about removing weapons from the customization slot. I use only one MG, I made another one for fun by accident, let me delete it Konami! Please! Am gonna write them a letter.

Also, how far have you looked into MGO code for EQP_None and weapon customization deletion? I know we can't change the UI but the code will help a lot if it's there. I haven't looked at any MGO code at all other than a few XP hacks but I'll be doing that now.
unknown123 wrote: Second workaround is to call lua function to drop a supply box with a weaponId you need (still need to wait for a box to land). Boxes are free btw.
How to do this? Forcing TppPlayer.RestoreSupplyCbox() or calling Player.RequestToSupplyCbox - but what would be the inputs to the latter? Item id and a Vector3? It's not called through existing code.
unknown123 wrote: Third one is to add weapon to enemy weapon table then just grab it out of their hands (long way, never used it, I think it was in some of infheaven videos)
This would be my default approach since I was too uncomfortable with a lot of code earlier and testing 7 different weapon types this way proved much easier.
unknown123 wrote: Or even better, call TppPickable.DropItem or whatever it was
While this works it won't drop player equip as far as I can tell. Other than the ones that have enemy usable equivalents. I tried an approach where I would force *all* the weapons to load using RequestLoadToEquipMissionBlock and then try to drop them in concentric circles around the player. Issues included the regular gamut with invisibility, no HUD icons, can't fire etc. Although I was not adequately prepared for this at the time so will take it up again.
unknown123
advanced
Posts: 75
Joined: Sat Apr 09, 2016 5:36 pm
Has thanked: 4 times
Been thanked: 13 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by unknown123 »

nasanhak wrote:First, icons are broken, not supplying an icon sets the last used gun's icon. Next the customize page lists the None slot lol. Plus it has stats for some reason.
Icons work fine for me, I am using dummy icon on sortie prep (white square), nothing while playing. About customizing - set p32 and p33 to 0, that will block the 'gun'. It has stats because technically it is a weapon, while genuine "None" slots are more like a separate option. See https://github.com/unknown321/mgsmonste ... meters.txt for p* stuff.

nasanhak wrote:Third issue is that when using DD Staff and the Handgun slot, the ammo count shows up in the slot as 0/0.
I think you've messed up something, no ammo count for me. Or am I looking in the wrong places?

http://i.imgur.com/Hy4BADq.jpg picrelated.
nasanhak wrote: Plus this code works as well, don't even have to develop - it would be good idea to assign a dummy slot icon however! Anybody trying, add at end of respective file.

Code: Select all

--DEV file
TppMotherBaseManagement.RegCstDev{
        p00=902,
	p01=TppEquip.EQP_None,
	p02=TppMbDev.EQP_DEV_TYPE_Shotgun,
-----
	p02=TppMbDev.EQP_DEV_TYPE_GrenadeLauncher,
-----
	p02=TppMbDev.EQP_DEV_TYPE_Submachinegun,

--FLOW file
TppMotherBaseManagement.RegFlwDev{
  p50=876,
You have to develop, because you already developed weapons with p00=900-904 - their development number. "None" slots for any weapon slot aside from primary hip and secondary gun are redundant - there are built-in None slots for them. Also setting p50=876 is not needed I think.
nasanhak wrote:At this point I really don't know why Konami just won't add in this feature as a default. Am gonna write them a letter.
I wrote them a letter like what, 6 months ago, tried to contact that community guy on reddit and yet no answer.
nasanhak wrote:Also how about removing weapons from the customization slot. I use only one MG, I made another one for fun by accident, let me delete it Konami! Please! Am gonna write them a letter. Also, how far have you looked into MGO code for EQP_None and weapon customization deletion? I know we can't change the UI but the code will help a lot if it's there. I haven't looked at any MGO code at all other than a few XP hacks but I'll be doing that now.
Eazy, fill vars.userPresetCustomizedWeapon with zeroes.
nasanhak wrote:Forcing TppPlayer.RestoreSupplyCbox() or calling Player.RequestToSupplyCbox - but what would be the inputs to the latter? Item id and a Vector3? It's not called through existing code.

Code: Select all

_chute = true
_equipId = TppEquip.EQP_WP_EX_hg_013
_dropType = 0 --weapon/loadout?
function dropbox(_chute, _equipId, _dropType)
	-- RequestToSupplyCbox - with chute
	-- RequestToDropCbox - without
	
	if (_chute == true) then
		TppUiCommand.AnnounceLogView( string.format('sending %s', tostring(_equipId)) )
                -- height is not working?
		Player.RequestToSupplyCbox{ aimPosition = Vector3(TppPlayer.GetPosition()), height = 25.0, equipId=_equipId, dropType=_dropType }
	else
		TppUiCommand.AnnounceLogView('Dropping a box on you!')
		Player.RequestToDropCbox{ aimPosition = Vector3(TppPlayer.GetPosition()), height=100.0 }
	end
end
nasanhak wrote: I tried an approach where I would force *all* the weapons to load using RequestLoadToEquipMissionBlock and then try to drop them in concentric circles around the player. Issues included the regular gamut with invisibility, no HUD icons, can't fire etc.
There is a size limit of a block, look for EQUIP_BLOCK_SIZE or something like that, I think it prevents all guns from loading. Tried to mess with it before, but results were disappointing.
Ashtails
beginner
Posts: 36
Joined: Sun Sep 20, 2015 8:57 pm

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by Ashtails »

unknown123 wrote: The first one is the easiest one - add more weapons to the weapons table. https://github.com/unknown321/mgsv_rese ... ubsistence - good_subsistence+guns will allow you to develop and equip honey bee, training rifle and skullfaces shotgun, as well as 'None' slots as primary and secondary weapon - no more forced equip changes via lua. It works in a fun way, I'll try to explain it further in a separate article when I have time. You can just run a diff between my files and original ones, that alone should give you rough idea of what's happening. However there may be overlapping issues when konami adds more stuff, idk what happens then.
Sooooo how do you install it? What folder am I supposed to put the lua files in? Also you should release this on the nexus
unknown123
advanced
Posts: 75
Joined: Sat Apr 09, 2016 5:36 pm
Has thanked: 4 times
Been thanked: 13 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by unknown123 »

Ashtails wrote:Sooooo how do you install it? What folder am I supposed to put the lua files in? Also you should release this on the nexus
I dunno, with snakebite? There are mgsv files in that folder. http://i.imgur.com/rZ2TKVo.png

And no, there will be no release on nexus. I don't like the interface, don't like ads and the most important - I don't want to update github AND nexus, it takes some time already and with nexus it will be taking even more.
nasanhak
advanced
Posts: 71
Joined: Sat Nov 28, 2015 6:01 am
Has thanked: 10 times
Been thanked: 4 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by nasanhak »

unknown123 wrote: Icons work fine for me, I am using dummy icon on sortie prep (white square), nothing while playing.
Well yeah i meant they are working but there is a bit of breaking - check the double EQP:
http://imgur.com/a/nvIlk
unknown123 wrote: I think you've messed up something, no ammo count for me. Or am I looking in the wrong places?
This is what I meant, should have explained better: http://imgur.com/xTI2SfQ. I test everything out a lot.

more P* details:

Code: Select all

p32=1	--rX46 Allow weapon customization: set to 1 to make a weapon customizable; will crash for guns with barrels that are not customizable by default - exception is missiles, set to 0 to remove customization from a weapon
p33=1	--rX46 Allow color change: set to 0 to restrict some level of customizability, I can see that color alone is disabled :? --maybe it is only for color customizability like for MISSILES! Of course


p51 is the order of dev of item chains, when 0 it is the first item in the dev chain
p52 is grade
** combo of p51 and p52 creates the dev chain for an item/weapon - can be customized but if not careful, may break development menu tabs/game in subtle ways
p53 is dev GMP
** first unit type requirement is not set in this file, or in any file as far as I can tell
p56 is the second unit type requirement that is required, can be zero but still u never know. Values range from 1-7, each corresponds to an MB unit, dnt remember exact order
p55 and p57 are unit lvl requiremenets, these cannot be zero if a unit type is set
p58, p60 are dev resource types
p59, p61 are dev resource values
p65 and p67 are usage resource types
p66 and p68 are usage resource vales
p71 is dev time

Also order of records in these files seems to be strict meaning you can't insert the same number of records at the beginning or in the middle in both the Const and Flow files and expect it to work. The dev pages/chains break. Anything new has to go at the end.
unknown123 wrote: You have to develop, because you already developed weapons with p00=900-904 - their development number. "None" slots for any weapon slot aside from primary hip and secondary gun are redundant - there are built-in None slots for them. Also setting p50=876 is not needed I think.
Yes - I missed the dev part cause thought I had replaced the save file correctly, cannot skip developing any new items.
Yes - Built in slots much better are
Yes - Setting p50 isn't necessary, I just did it for some consistency
unknown123 wrote: I wrote them a letter like what, 6 months ago, tried to contact that community guy on reddit and yet no answer.
Well they'll be hearing from me about this too then!


As for your dump.txt, parts of it showing the 'loadstring' look like this: http://imgur.com/Cpuqfe8. Not sure if this is normal.
unknown123 wrote: Eazy, fill vars.userPresetCustomizedWeapon with zeroes.
Well yeah, I figured it would be something like this. But it seems to be some kind of table I can't read or understand. Infact all such tables leave me at a dead end. What the inspect tells me is this:

Code: Select all

userPresetCustomizedWeapon = <1958>{
      [-285212666] = 24,
      [-285212665] = <userdata 463>,
      __index = <function 10388>,
      __newindex = <function 10389>,
      <metatable> = <table 1958>
    },
I think the vey first entry 24 is the size of the table but that's as far as I have gotten.


Thanks for the Supply Drop trigger code! How did you figure out the params though?! If you did some kind of source code finding thing then you could apply the same process to every single function that is hidden couldn't you?
unknown123
advanced
Posts: 75
Joined: Sat Apr 09, 2016 5:36 pm
Has thanked: 4 times
Been thanked: 13 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by unknown123 »

Double equip is not a big deal I think. About ammo count - game does the same on subsistence missions, so this is not a bug, but intended behaviour. http://i.imgur.com/lecOOLB.jpg - C2W subsistence.

P* details are nice, will add to my tables.
nasanhak wrote: What the inspect tells me is this:

Code: Select all

userPresetCustomizedWeapon = <1958>{
My bad. userPresetCustomizedWeapon - table with customized weapon ids, 24 is indeed a table size.

Code: Select all

local index = 0
while type(vars.userPresetCustomizedWeapon[index]) == 'number' do
		vars.userPresetCustomizedWeapon[index] = 0
		index = index + 1
	end	
Then null table userPresetChimeraParts, which has parts for every weapon from table above. Same code, 288 values.
nasanhak wrote:Thanks for the Supply Drop trigger code! How did you figure out the params though?!
Just applied some common sense.
Ashtails
beginner
Posts: 36
Joined: Sun Sep 20, 2015 8:57 pm

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by Ashtails »

unknown123 wrote:
Ashtails wrote:Sooooo how do you install it? What folder am I supposed to put the lua files in? Also you should release this on the nexus
I dunno, with snakebite? There are mgsv files in that folder. http://i.imgur.com/rZ2TKVo.png

And no, there will be no release on nexus. I don't like the interface, don't like ads and the most important - I don't want to update github AND nexus, it takes some time already and with nexus it will be taking even more.
Well, guess it's time to switch to using snakebite, But it will be worth it to play a playthrough as Paz with a water gun, wooden assault rifle, and magazine. Thanks for the files!
CantStoptheBipBop
advanced
Posts: 53
Joined: Sat Aug 27, 2016 9:43 am
Has thanked: 7 times
Been thanked: 7 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by CantStoptheBipBop »

I'll have to catch up on what's going on in the thread later I guess. Anyway I've got a lua script question. I'm modifying TppRevenge.lua to keep track of the revenge levels during sorties and output a message once enough points have been generated to reach the next level. The part of that I'm having issues with is that when I assign the initial values for the levels and points it outputs what looks like the function ID for e.GetRevengeLv and e.GetRevengePoint.

Code: Select all

function rvngCalcRan()
rCmbtSubTtl=0
rStlhSubTtl=0
rVehLv=e.GetRevengeLv(e.REVENGE_TYPE.VEHICLE)
rVehPt=e.GetRevengePoint(e.REVENGE_TYPE.VEHICLE)
TppUiCommand.AnnounceLogViewLangId("announce_rvng_lvl_curr","rvng_type_name_veh",rVehLv,rVehPt)
ToolRanCheckRevenge=ToolRanCheckRevenge+1
end
Edit: So I've figured out what the issue is and the solution is that you can't assign a variable as the function but you can create it as a table. So instead of rVehLv you would do e.rVehLv in that lua file. It works fine like that and allows you to perform arithmetic on the original number but TppUiCommand.AnnounceLogViewLangId seems to not handle multiple tables as the input.

Code: Select all

-- outputs "Current [Anti-vehicle response]: [lvl 2] [points tableID]"
TppUiCommand.AnnounceLogViewLangId("announce_rvng_lvl_curr","rvng_type_name_veh",e.rVehLv,e.rVehPt)
I mean I could just call them in separate LangIds but that doesn't look as nice. The more efficient solution at this point would be just to modify the vanilla functions to get a value to use as a constant rather than calling functions multiple times.
nasanhak
advanced
Posts: 71
Joined: Sat Nov 28, 2015 6:01 am
Has thanked: 10 times
Been thanked: 4 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by nasanhak »

CantStoptheBipBop wrote:So instead of rVehLv you would do e.rVehLv in that lua file. It works fine like that and allows you to perform arithmetic on the original number but TppUiCommand.AnnounceLogViewLangId seems to not handle multiple tables as the input.
Nope, don't do this. Use this instead:

Code: Select all

for revengeTypeCode=0,this.REVENGE_TYPE.MAX-1 do
    TppUiCommand.AnnounceLogView("RevengeTypeName: "..tostring(this.REVENGE_TYPE_NAME[revengeTypeCode+1])..", points set to: "..tostring(gvars.rev_revengePoint[revengeTypeCode])..", level: "..tostring(this.GetRevengeLv(revengeTypeCode)))
  end
TppUiCommand.AnnounceLogView will print any and all concatenated strings. Provided they are fed as strings. Max char limit of 255 courtesy of tinmantex

Since I have looked a lot at the revenge code:
REVENGE_TYPE_NAME - has name of each revenge
REVENGE_TYPE - uses the name as an index to set a corresponding code for the revenge (numbers are easier to compare). Code set here will be 1 less than the index of the revenge type in REVENGE_TYPE_NAME

Here's each revenge type and it's corresponding code:

Code: Select all

this.REVENGE_TYPE_NAME={
	--r43 INFO
  "STEALTH", --0 --Points max: 599 --Revenge blocking missions 3
  "NIGHT_S", --1 --Points max: 399 --Revenge blocking missions 1
  "COMBAT", --2 --Points max: 599 --Revenge blocking missions 5
  "NIGHT_C", --3 --Points max: 199 --Revenge blocking missions 1
  "LONG_RANGE", --4 --Points max: 299 --Revenge blocking missions 1
  "VEHICLE", --5 --Points max: 399 --Revenge blocking missions 1
  "HEAD_SHOT", --6 --Points max: 799 --Revenge blocking missions 1
  "TRANQ", --7 --Points max: ? --Revenge blocking missions 0
  "FULTON", --8 --Points max: ? --Revenge blocking missions 0
  "SMOKE", --9 --Points max: 399 --Revenge blocking missions 1
  "M_STEALTH", --10 --Points max: ? --Revenge blocking missions 0
  "M_COMBAT", --11 --Points max: ? --Revenge blocking missions 0
  "DUMMY", --12 Extra dummy values provided to match up with this.REVENGE_LV_MAX? - uuuhhhh maybe not
  "DUMMY2", --13
  "DUMMY3", --14
  "DUMMY4", --15
  "MAX" --DEFAULT: 16
}
DUMMY are not used

REVENGE_LV_LIMIT_RANK_MAX=6 is an *index* for each entry of the table REVENGE_LV_MAX. Notice that REVENGE_LV_MAX uses the revenge types as an index and each value is a table, a table holding a max of 6 values. That is what REVENGE_LV_LIMIT_RANK_MAX is for.

How it works, GetRevengeLvMax() will use REVENGE_LV_MAX[revengeType] to fetch the max revenge level allowed for a particular type of revenge.

Code: Select all

[this.REVENGE_TYPE.HEAD_SHOT]={0,1,2,3,5,7}
HEAD_SHOT as a result has max level of 7(game is bugged and will actually look for max level 10 in some places, but HEAD_SHOT is the only revenge bugged in this way).

Revenge points required to hit a level are = level*100. So level 2 requires 200 points and level 7 requires 700 points. Max points a revenge can have will be =(MAX revenge level*100)+99

There's a lot more detail in there. I'll share if you want. Have a look at the source here:
http://www.nexusmods.com/metalgearsolidvtpp/mods/349/?

I have provided comments for a lot of the vanilla functionality.
nasanhak
advanced
Posts: 71
Joined: Sat Nov 28, 2015 6:01 am
Has thanked: 10 times
Been thanked: 4 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by nasanhak »

unknown123 wrote:About ammo count - game does the same on subsistence missions, so this is not a bug, but intended behaviour
Well yeah its intended behavior but am pretty sure its a patch up job to a bug. The Handgun slot completely disappears for Snake with EQP_None and only the Arm slot is visible when selecting a Secondary. DD Soldiers don't get an arm slot so am pretty sure the Secondary slot would have been completely disappearing from the UI. Someone patched it up cheap instead of fixing the UI
unknown123 wrote:

Code: Select all

local index = 0
while type(vars.userPresetCustomizedWeapon[index]) == 'number' do
		vars.userPresetCustomizedWeapon[index] = 0
		index = index + 1
	end	
Should have thought of this! I assumed the data would be unreadable, which am pretty sure it is even in this case. A numerical sequence from some combination we won't be able to figure out for a while. Some people on cheat engine however have figured out staff headers and the likes tho.
unknown123 wrote: Just applied some common sense.
Well sure but I would have never figured out the _chute part.
Drop types are here:

Code: Select all

SupplyCbox = {
    DROP_TYPE_AMMO = 4,
    DROP_TYPE_EMPTY = 5,
    DROP_TYPE_EQUIPMENT = 0,
    DROP_TYPE_HAND = 2,
    DROP_TYPE_SUIT = 1
  }
Also, just throwing it out there:
1. Know of a way to change existing MB staff data through code? Like changing existing staff params - or changing all staff to female.
2. Any way to change staff faceIds which will have the same effect as above
3. Any way to work with staff headers? vars.mbmStaffSvarsHeaders
4. Way to activate the chicken head caps?
5. Stealth triggering and maybe stealth not being removed if you bump into someone.

I have figured out the TppMotherBaseManagement.AddVolunteerStaffs() and TppMotherBaseManagement.DirectAddStaff() functions.

I can build an all female army using the latter - not the best approach in the world but it works. But there are issues - like most of them having similar names. Stats and faces are different tho. Need to fine tune my approach but if it is at all possible to change existing staff in one go (I think it is possible to reroll staff stats through code if you keep visiting MB, haven't tried, very slow approach to change 3500 randomly picked staff) it would be much much better than my current approach.

@tex
One of the female faces in your femaleFaceIds list is broken - menu shows no face icon, inivisi head on MB, I'll check and get back to you on which one it is.
CantStoptheBipBop
advanced
Posts: 53
Joined: Sat Aug 27, 2016 9:43 am
Has thanked: 7 times
Been thanked: 7 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by CantStoptheBipBop »

BobDoleOwndU wrote:I used a function for changing equipment I came across while digging through the mission files. I figured there'd be one for guns since there's a similar function for outfits. Then I decided to see if it would work for equipping the unobtainable weapons.
Pretty nifty function. I'll have to toy with it at some point to see if I can do anything crazy with it.
nasanhak wrote:Nope, don't do this. Use this instead
Awesome, that should help and it's nice to know the other stuff you noted. I've rewritten the script and all of the math seems to be working correctly now. Basically it fetches the initial revenge lvl and points of every category after any trigger is hit if a boolean I put in isn't nil, throws current points for each level at the screen, and defines the boolean so it doesn't run again. Then it calculates everything and throws a "level will increase by n+1" message at the screen once, if the conditions are met, or returns. I still need to add a stealth/combat end function since those two are special snowflakes as far as the way the game handles them goes. So I'm off to find a decent way of detecting that. I guess something like "on left hotzone" or "on heli door close" would work? Or is there already a known function for detecting the sortie ending/starting?

Code: Select all

e.AddRevengePointByTriggerType(e.REVENGE_TRIGGER_TYPE.SMOKE)
if ToolRanCheckRevenge<1 then rvngCalcRan() end
local l,m,n,o,q
-- might be redundant. Not sure how lua handles non-existant variables in conditionals.
-- I was getting Batch flashbacks so I threw on a secondary nil anyway.
local p=rGasChk or nil
-- trigger value
l=15
-- sets mission decay based on level if applicable
if e.rGasLv>0 then
m=50 else
m=10
end
e.n=e.rGasLv
e.o=e.rGasPt+l
e.n=e.n*100
-- (points+triggerPoints) - (lvl*100) - (currentLvlPointDecay)
e.n=e.o-e.n-m
-- accumulated points cap at 99
if e.n>=99 then
if p==nil then
e.q=e.rGasLv+1
TppUiCommand.AnnounceLogViewLangId("announce_rvng_lvl_max","rvng_type_name_gas",e.q)
rGasChk=1
return
else
return
end
end
-- saves new value of points if less than max
e.rGasPt=e.o
end
end
nasanhak wrote:(game is bugged and will actually look for max level 10 in some places, but HEAD_SHOT is the only revenge bugged in this way)
Uh might be because of it being set at 10 for the special max level in hard missions, unless my memory is betraying me on that. It's been a few months since I've thoroughly read the whole revenge file. Though on the topic of bugs: the gas/smoke response I'm sure is bugged. If you throw a log view statement under both of the e.AddRevengePointByTriggerType(e.REVENGE_TRIGGER_TYPE.SMOKE) functions then you'll see what I mean. For smoke it pops up a handful of times for each soldier, plus multiple times for any nearby that see the smoke. Then if you melee them it counts a few times again. Wake them up and it counts once again.

It certainly explains why they always seem to don gas masks immediately after the sortie when I had only thrown a few smoke nades. Kind of a weird bug but I can see how it slipped past the testers since it's something so minor.
nasanhak
advanced
Posts: 71
Joined: Sat Nov 28, 2015 6:01 am
Has thanked: 10 times
Been thanked: 4 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by nasanhak »

CantStoptheBipBop wrote: Uh might be because of it being set at 10 for the special max level in hard missions
Hard missions use the same GetRevengeLvMax func so max revenge level will still be based on REVENGE_LV_MAX table.
CantStoptheBipBop wrote: If you throw a log view statement under both of the e.AddRevengePointByTriggerType(e.REVENGE_TRIGGER_TYPE.SMOKE) functions then you'll see what I mean. For smoke it pops up a handful of times for each soldier, plus multiple times for any nearby that see the smoke. Then if you melee them it counts a few times again. Wake them up and it counts once again.
Look for this:

Code: Select all

(((((((((((e==TppDamage.ATK_Smoke or e==TppDamage.ATK_SmokeOccurred)or e==TppDamage.ATK_SleepGus)or e==TppDamage.ATK_SleepGusOccurred)or e==TppDamage.ATK_SupportHeliFlareGrenade)or e==TppDamage.ATK_SupplyFlareGrenade)or e==TppDamage.ATK_SleepingGusGrenade)or e==TppDamage.ATK_SleepingGusGrenade_G1)or e==TppDamage.ATK_SleepingGusGrenade_G2)or e==TppDamage.ATK_SmokeAssist)or e==TppDamage.ATK_SleepGusAssist)or e==TppDamage.ATK_Grenader_Smoke)or e==TppDamage.ATK_Grenader_Sleep
And the _OnDamage(t,E,r) func right below it. They itended it to be like that. Problem is Smoke gains 15 points for each trigger when it should have been lower like 5.
CantStoptheBipBop wrote: stealth/combat end function since those two are special snowflakes as far as the way the game handles them goes
REVENGE_POINT_TABLE - point increases for each trigger type
MISSION_TENDENCY_POINT_TABLE - stealth and combat tendency increase table

_GetMissionTendency(missionId) - decides the stealth/combat tendency of the *mission* based on M_STEALTH and M_COMBAT points. Which ever is higher by at least 10 points is the tendency. Otherwise it's a draw.

ApplyMissionTendency(missionId) - based on mission tendency, increases Stealth/Combat depending on points table MISSION_TENDENCY_POINT_TABLE. Resets M_STEALTH and M_COMBAT to 0 at the end.

REVENGE_POINT_TABLE triggers increase M_STEALTH and M_COMBAT but never STEALTH and COMBAT - these will only increase at mission end(maybe abort?) by ApplyMissionTendency

Seriously check the mod files I pointed to on Nexus, it has everything in it. Sure I changed the revenge system a bit but it was very interesting work and will clear everything up for you.
Post Reply