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.
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 »

Tex wrote:
nasanhak wrote:p50 seems to be non important- just a numerical index for the number of rows in the file.
Well with p50 set to 0 it doesn't show in the development tab for the item type. Only in the Development requirements met tab.
With it set to the next sequential it doesn't show in the dev-met tab but does show in its item tab. (but then that would conflict on any additions)
Well.... Uhhh... p52 is the grade and has to be at least 1 in order to show the item in the correct category's tab. Should be at the very bottom. p51 is the order of the item in the dev chain.

A chain would look like this:
Item 1: p51=0, p52=1
Item 2: p51=1; p52=3

|Grade 1 Item 1|-----|Empty Grade 2|-----|Grade 3 Item 2|

With p51 and p52 set, p50 isn't necessary at all. The dev tab the item will show up in depends on p02(this is also the item's type)
For example: p02=TppMbDev.EQP_DEV_TYPE_GrenadeLauncher

Further, parent id(p03) for Item 2, should be the id(p00) for Item 1.
Item 1: p00=1001, p03=0
Item 2: p00=1002, p03=1001

Then only will the chain be shown.

If we have a third item like this:
Item 3: p00=1003, p03=1001, p51=0, p52=3

Notice that p51(pos in chain) is 0, so this is the first item in a new chain.

|Grade 1 Item 1|-----|Empty Grade 2|-----|Grade 3 Item 2|
|
|-----------------|Empty Grade 2|-----|Grade 3 Item 3|

(Forgive the graphics, tabbing(\t) don't seem to work)

If you share exactly what ur trying to add then I can tell you why it's showing up in the dev-items tab
Tex
veteran
Posts: 89
Joined: Sat Aug 20, 2011 4:51 am
Has thanked: 21 times
Been thanked: 11 times

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

Post by Tex »

I'm just describing the behavior of p50 that I see, for the same item (editing the same entry)

RegFlwDev{p50=0,p51=0,p52=1,
will show on the development-met tab, and not in its item category tab

RegFlwDev{p50=876,p51=0,p52=1,
will not show on development-met tab, but will in its item category tab

unknown123 wrote: Also there is a non-lua check function on FOBs that checks your equipment (CheckPlayerEquipmentServerItemCorrect) so allowing player who uses your mod to equip items not available for develompent may result in ban (if he equips it during online mission). I don't use my dummy slots on FOBs since I am not sure what exactly konami gets on their end and neither should you.
Good info, thanks.
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'm considering changing my username to CantStoptheSyntaxErrors. Or perhaps CantStoptheExplitives, due to the aforementioned syntax errors.

Just popping in to add to the list of things you can't do with TppUiCommand. Apparently it only accepts strings/numbers, any number of variables with a standard value (like 6 or "6"), and one table or value derived from tabled functions in the case of TppUiCommand.AnnounceLogViewLangId. If you do something like this:

Code: Select all

function name(egTable)
    variable=math.max(unpack(egTable))
    TppUiCommand.AnnounceLogView(variable)
end
Or this:

Code: Select all

level=5

function name(egTable)
    for k,v in pairs(egTable) do
        if v==level then
            local a=v
            TppUiCommand.AnnounceLogView(a)
        end
    end
end
It won't output anything. I was kind of expecting it to behave more like print().
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: It won't output anything. I was kind of expecting it to behave more like print().
Just wrap any non-string values in a tostring() call when passing to the func. A bit annoying but works.
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 »

Tex wrote:I'm just describing the behavior of p50 that I see, for the same item (editing the same entry)

RegFlwDev{p50=0,p51=0,p52=1,
will show on the development-met tab, and not in its item category tab

RegFlwDev{p50=876,p51=0,p52=1,
will not show on development-met tab, but will in its item category tab
Most recent testing results:
--Suits have the same equip name(p01) i.e. TppEquip.EQP_SUIT, so changing p00 for suits(and other items) that have the same p01 will create a totally new item. You would then be able to develop it, but when selected in the sortie screen, the id p00 won't have any data associated with it so, you just reset to the Olive Drabs outfit :)
--p50 cannot be 0 for suits at least AFAIK
--p69=1 hides DLC items from dev menu's individual item tabs (at least suits)
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'm starting to wonder how much easier it would have been to write some of my batch files in lua instead. Converting the unpacker over to do file counts with robocopy (seems to be much faster than xcopy) took more time than I anticipated.
nasanhak wrote:Just wrap any non-string values in a tostring() call when passing to the func. A bit annoying but works.
Oh good idea. I'll have to try that method. I skimmed through your revenge file's notes and noticed it said combat/stealth response totals are stored in the M_NAME. I was under the impression it didn't keep track of revenge points for stealth/combat in general outside of missions. Or does it still generate the points in free-roam, apply tendency points to the "actual" categories according to whichever is highest/equal at the end of a mission, and then reset the M_NAME points?

I was also curious what the point decay was for things not listed in e.REDUCE_POINT_TABLE or e.REDUCE_TENDENCY_POINT_TABLE. Like for helmets. I figured e.REDUCE_REVENGE_POINT=10 was the default for those cases but the last time I paid attention to it the total dropped by at least 40 points after mission completion.

Edit: Good lord lua runs like it just hit a bathtub full of coke compared to batch.

Image
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:I skimmed through your revenge file's notes and noticed it said combat/stealth response totals are stored in the M_NAME. I was under the impression it didn't keep track of revenge points for stealth/combat in general outside of missions. Or does it still generate the points in free-roam, apply tendency points to the "actual" categories according to whichever is highest/equal at the end of a mission, and then reset the M_NAME points?
Absolutely correct. Free roam/MB visits do not shift mission tendencies unless you force them on like with IH. But that is not really a good approach. Even if you don't do anything, Stealth and Combat are still adjusted and because of a DRAW in such a case will both rise/fall towards level 3.
CantStoptheBipBop wrote:I was also curious what the point decay was for things not listed in e.REDUCE_POINT_TABLE or e.REDUCE_TENDENCY_POINT_TABLE. Like for helmets. I figured e.REDUCE_REVENGE_POINT=10 was the default for those cases but the last time I paid attention to it the total dropped by at least 40 points after mission completion.
_ReduceRevengePointOther() reduces points for all revenge points at ends of missions. Reduction will be (revenge reduction value)*(current revenge level). MAX of 50 points can be reduced. Using the chicken cap reduces all revenge points by 100.
CantStoptheBipBop wrote:Edit: Good lord lua runs like it just hit a bathtub full of coke compared to batch.
Very very fast. But not really CPU optimized. Any huge for/while loops bring the system to a halt.
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 »

nasanhak wrote:_ReduceRevengePointOther() reduces points for all revenge points at ends of missions. Reduction will be (revenge reduction value)*(current revenge level).
I must have misread that then. For some reason I was thinking that was for just stealth/combat.
nasanhak wrote:Very very fast. But not really CPU optimized. Any huge for/while loops bring the system to a halt.
I don't doubt it. I was using Sublime to monitor it and printing stuff to its console lags behind like crazy. To the point that it just freezes after a few minutes of constant printing.

I wrote lua versions of the batch files I was using for building lang_dictionary. I can't get over the performance difference. It builds a 3.4m line text file for three-word combinations from a 1,600 line text file in five seconds. The brute-force block still needs improvement. It's not a slug but it's slower than it could be. It uses ASCII numbers as the table input just because it's less effort to type.

I was too lazy to throw the three generators in their own giant functions so that's why the comment brackets are at the top and bottom of each. If anyone uses the script just turn two of them into comment blocks before running it.

script dictionary

Code: Select all

----------------------------------------------------BRUTE-FORCE----------------------------------------------------
-- | A-Z == 65,90 | a-z == 97,122 | 0-9 == 48,57 | special == 32,47 & 58-64 & 91-96 & 123-126 |
--[[]]
local i
local langDictBrute=io.open("langDictBrute.txt", "w")
local m,t
t={}

for m=97,122 do
	m=string.char(m)
	table.insert(t,m)
end

for m=65,90 do
	m=string.char(m)
	table.insert(t,m)	
end

local function keyGen()
	local a,b,c,d,e,f,g
	for _,v in ipairs(t) do
		a=v
		for _,v in ipairs(t) do
			b=v
			for _,v in ipairs(t) do
				c=v
				for _,v in ipairs(t) do
					d=v
					for _,v in ipairs(t) do
						e=v
						langDictBrute:write("@"..a..b..c..d..e.."$", "\n")
					end
				end
			end
		end
	end
	langDictBrute:close()
end
keyGen()
--[[--]]
----------------------------------------------------DICTIONARY ATTACK----------------------------------------------------
--[[]]
local startOfScript=os.time()
math.randomseed(os.time())
math.random()
local dictionary=io.open("dictList.txt")
local dictionaryAtk=io.open("dictAtk.txt", "w")
local dT={}
for line in dictionary:lines() do
	table.insert(dT,line)
end
local d=#dT

while true do
	if os.time()>=startOfScript+1 then dictionaryAtk:flush(); break end
	local a,b,c
	a=dT[math.random(d)]
	b=dT[math.random(d)]
	c=dT[math.random(d)]
	dictionaryAtk:write("@"..a.."_"..b.."_"..c.."$", "\n")
end
--[[--]]
----------------------------------------------------NUMBER GENERATOR----------------------------------------------------
-- Far faster to use this instead of pulling values from brute-force table blocks
--[[]]
local n,m
local langDictNum=io.open("langDictNum.txt", "w")
for n=0,9999 do
	for m=0,999 do
		langDictNum:write("@"..string.format("%05d", n).."_"..m.."$", "\n")
	end
end
--[[--]]
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 »

This is what I had in mind with texture editing:
http://imgur.com/a/UeZ4R

Don't know if they look good or not

Also Mr. CantStoptheBipBop, would you consider using this for your Radio Silence mod?

Code: Select all

TppRadio.Stop()
It essentially stops all codec radio dialogue. Removes all subtitles as well but that's okay I guess. Have know about it for a while but didn't want to maintain/release another mod. No fulton extraction dialogue, no tips n hints, no mission briefings or "That's the target". Nothing seems to break. Have been playing for months really. Haven't played all missions but still. Cutscene audio plays as normal.

Cal it in an Update function style manner. With ThreeSocks3' batch installer it would be usable with any other mod. Alternately @tex you can add this as an option too.
Tex
veteran
Posts: 89
Joined: Sat Aug 20, 2011 4:51 am
Has thanked: 21 times
Been thanked: 11 times

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

Post by Tex »

Alternate drop code that also drops support items:

Code: Select all

    local subIndex=nil
    --tex NOTE: currentInventorySlot doesn't seem to ever be set to PlayerSlotType.ITEM
    if vars.currentInventorySlot==PlayerSlotType.ITEM then
      subIndex=vars.currentItemIndex
    elseif vars.currentInventorySlot==PlayerSlotType.SUPPORT then
      subIndex=vars.currentSupportWeaponIndex
    end

    Player.UnsetEquip{
      slotType=vars.currentInventorySlot,
      subIndex=subIndex,
      dropPrevEquip=true,
    }
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 »

Tex wrote:Alternate drop code that also drops support items:

Code: Select all

    local subIndex=nil
    --tex NOTE: currentInventorySlot doesn't seem to ever be set to PlayerSlotType.ITEM
    if vars.currentInventorySlot==PlayerSlotType.ITEM then
      subIndex=vars.currentItemIndex
    elseif vars.currentInventorySlot==PlayerSlotType.SUPPORT then
      subIndex=vars.currentSupportWeaponIndex
    end

    Player.UnsetEquip{
      slotType=vars.currentInventorySlot,
      subIndex=subIndex,
      dropPrevEquip=true,
    }

Code: Select all

Player.UnsetEquip{
	      slotType=PlayerSlotType.ITEM,
	      subIndex=vars.currentItemIndex,
	      dropPrevEquip=true,
	    }
Works but items have to be equipped in order for the index to be updated soo... Plus they don't have drop icons ie. are not pickup-able.

Oh also:

Code: Select all

Player={
    	{msg="OnEquipItem",
    		func=function(a,b,c,d,e,f,g,h)	
    			TppPlayer.DebugPrint(
          "OnEquipItem"
          .." a: "..tostring(a)
          .." b: "..tostring(b)
          .." c: "..tostring(c)
          .." d: "..tostring(d)
          .." e: "..tostring(e)
          .." f: "..tostring(f)
          .." g: "..tostring(g)
          .." h: "..tostring(h)
          ,3)
    		end
    		},
}
Too complicated

EDIT:

Code: Select all

TppUiCommand.ResetNoUseEquipId(390)
equivalent to
TppUiCommand.ResetNoUseEquipId(TppEquip.EQP_SWP_WormholePortal)
enables the portal mine icon in the HUD but when equipped icon is still crossed out and the mine's not usable :/
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 »

nasanhak wrote:This is what I had in mind with texture editing:
Don't know if they look good or not
Looks good to me. Though I don't do texture editing so I wouldn't be able to give you a detailed critique or anything.
nasanhak wrote:Also Mr. CantStoptheBipBop, would you consider using this for your Radio Silence mod?

Code: Select all

TppRadio.Stop()
I honestly forgot about that mod. It sounds like a nifty function but I prefer keeping the optional mission codecs and one-time calls (like the first time you find digitalis) in, as well as the ones that indicate when the mission is complete, certain intro calls, etc.
Tex wrote:Alternate drop code that also drops support items
Cool inf addition. I tried merging it and that weapon drop mod awhile back but could never get them working together properly. For some reason it would cause me to spawn without a collision box (I guess) and fall below the map.

So I've been working on a lua script to automate the whole lang_dictionary process and it's basically complete. There are still some small inefficiencies in the code but nothing I'm too concerned about since lua's end of things already runs in a heartbeat. Now it can run more like actual brute-force and dictionary attacks instead of simply generating large text files that have to be cut down and edited for LangTool to use (apparently it doesn't run with enough memory to load files of absurd size).

The gist is that it loads a file with the current entries+new ones that it has generated into a table. Then it performs the dictionary attack function for one second, runs LangTool on everything or just selected files, pulls lines containing "LangId" with cmd's findstr command, loads those into a table and isolates the entries with regex, calls a function to remove entries that are duplicates from the original table, overwrites the file loaded at the start with values from the new table, and loops. The table duplicate functions are from here.

Code: Select all

math.randomseed(os.time())
math.random()
local file=io.open("newDict.txt")
local t={}
for line in file:lines() do
	t[#t+1]=line
end
os.execute[["type nul>lang_dictionary.txt"]]
os.execute[["for /r %G in (*.lng?) do (LangTool.exe "%G")"]]

local function table_count(argTable,argEntry)
  local count
  count=0
  for _,v in pairs(argTable) do
    if argEntry==v then
    	count=count+1
    end
  end
  return count
end

local function table_unique(idTable,fullTable)
  local newTable
  newTable={}
  for _,v in pairs(fullTable) do
  	idTable[#idTable+1]=v
  end
  for _,v in ipairs(idTable) do
    if(table_count(newTable,v)==0) then
      newTable[#newTable+1]=v
    end
  end
  return newTable
end


local function dictionaryAttack()
	local startOfScript=os.time()
	local fileIn=io.open("dictList.txt")
	local fileOut=io.open("lang_dictionary.txt", "w")
	local t={}
	for line in fileIn:lines() do
		t[#t+1]=line
	end
	local d=#t

	while true do
		if os.time()>=startOfScript+1 then fileOut:flush(); fileOut:close(); break end
		local a,b --,c
		a=t[math.random(d)]
		b=t[math.random(d)]
		--c=t[math.random(d)]
		fileOut:write("announce".."_"..a.."_"..b, "\n")
	end
end

local function runLangTool()
	local tC={}
	local m={}
	local file="tempIdComp.txt"
	--os.execute[["for /r %G in (*.lng?) do (LangTool.exe "%G")"]]
	os.execute[["LangTool.exe tpp_announce_log.eng.lng2"]]
	os.execute[["LangTool.exe tpp_fob.eng.lng2"]]
	os.execute[["findstr /r "LangId" *.xml>tempIdComp.txt"]]
	file=io.open(file)
	for line in file:lines() do
		tC[#tC+1]=line
	end
	for _,v in pairs(tC) do
		m[#m+1]=(v:match(".*LangId=.([a-z,A-Z,0-9,_]*).*"))
	end
	for i=1,#tC do
		tC[#tC+1]=nil
	end
	m=table_unique(m,t)
	return m
end

while true do
	dictionaryAttack()
	local m=runLangTool()
	local file=io.open("newDict.txt", "w")
	for _,v in pairs(m) do
		file:write(v,"\n")
	end
	file:flush(); file:close()
	file=io.open("newDict.txt")
	t={}
	for line in file:lines() do
		t[#t+1]=line
	end
end
It seems to work flawlessly but let me know if anyone has issues with it. I recommend sticking to a max of two-word generation with a common word of your choosing since that seems to be the best method of getting clean results. Just spamming LangTool with the three+ word combos gives back functional "wrong" entries, they just look ugly.
abuali
beginner
Posts: 20
Joined: Sun Dec 12, 2010 5:48 pm

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

Post by abuali »

I'm working on translating the game to arabic, I'm interested only on the subtitles not the user-interface. However I tried to many options, the one that worked out is to modify Kanjifont.ffnt by adding extra glyps to the file and use the Japanese language as a base... the work is going smoothly in this part. But the problem is in the user-interface, since I choose the Japanese language, I had to at least use the original English files in the game and replace the Japanese ones, I found most of - jpn.lng/lng2 - that is needed by there still some missing, I searched in all un-named fpk and i found only two .lng/lng2 more, but the game still had some Japanese lines in some parts...

Anyone can lead me to all other .lng?, or if someone had a way for telling the English base of the game to just read foreign letters?

I know it is a hard task for you people.
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 »

abuali wrote:Anyone can lead me to all other .lng?, or if someone had a way for telling the English base of the game to just read foreign letters?

I know it is a hard task for you people.
http://pastebin.com/rdiQ5ype

See https://github.com/unknown321/mgsv_lua_ ... master/inf for files that were packed in fpks.
abuali
beginner
Posts: 20
Joined: Sun Dec 12, 2010 5:48 pm

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

Post by abuali »

unknown123 wrote:
abuali wrote:Anyone can lead me to all other .lng?, or if someone had a way for telling the English base of the game to just read foreign letters?

I know it is a hard task for you people.
http://pastebin.com/rdiQ5ype

See https://github.com/unknown321/mgsv_lua_ ... master/inf for files that were packed in fpks.
Thanks, I found All of those files but maybe I miss place them.
Btw I'm using Gztools, can I edit the un-named fpks then repack them as un-named again?
Post Reply