Jump to content

Recommended Posts

Pregnancy Normalmap Swapper

View File

 

 

WARNING: This mod may be unstable. Do not use this mod in serious play.☢

There is a procedure, but basically uninstalling in mid-game is not recommended.

Also, I recommend using Clean Save Auto-reloader(https://www.nexusmods.com/skyrimspecialedition/mods/88219)

 

 

Description

Pregnancy Normalmap Swapper is a mod that automatically changes the normal map according to the Body Morph value.

Created for older pregnancy mods that have a pregnancy function but no normal map replacement function.

This effect can also be applied to NPCs using SPID.

However, several steps are required for implementation. Failure to do so, or making a mistake, could result in your PC exploding. Even if you are lucky and it does not explode, your Skyrim will be looks cringe.

 

 

 

 

Requirements

 

 

Recommends

 

 

Compatible

Spoiler

 

 

 

  • Skill Based Muscle 5.4
  • The behavior is that the SBM normal map is first applied and then overwritten by the PNS normal map.
  • NOTE1: PNS and SBM must have the same effect coverage. If DISTR is set so that only one is applied, the appropriate normal map will not be applied.
  • NOTE2: In ModManager, the priority of PNS should be lower than that of SBM.
    • In other words, for any conflicting files (the pex file will conflict), be sure to set the PNS file to overwrite the SBM file.
    • These conflicting files are needed in an environment where SBM is NOT installed; if PNS files overwrite SBM files, SBM will not work.
      • I don't know why, but it seems that in SkryimAE 1.6.1170, the mod does not work well unless all the necessary scripts are present at compile time, even if they are not actually used.
      • I don't think that was the spec in the SE... I am not sure.

 

 

 

Incompatible

  • Anything that changes the normal map and is not on the compatible mod list above.

 

 

Installation - Horribly tedious, lengthy, esoteric, and tedious.

Note: Before installing, please take a quick look at the uninstallation procedure. If you are likely to uninstall and are fed up with the procedure, you should not install it.

 

Spoiler

1. Normal map preparation

I have prepared a sample using dw's Pregnant Normal Maps for CBBE 3BA Fair Skin Complexion (Curvy)

Please check "Download this file".

If you are satisfied with only this sample file, skip to step 3.

  • First you need to prepare a normal map according to the stage of pregnancy.
  • If you want to apply the PNS effect to several skin textures, you must prepare them all.
  • File name <male|female>body_1_msn_pX.dds 
    •  Note 1: The gender here is Skyrim's original gender; the SexLab Framework allows you to set your own gender, but not this one.
    • Note 2: In Skyrim, Argonians and Khajiit have different file names than Humanrace, but in PNS, all should be unified to (fe)malebody_1_msn.
    • Note 3: The number of normal maps to be prepared must be the same for all races. For example, you cannot prepare 5 maps for Nord and only 3 maps for other races.
  •  pX should be p1,p2,p3,..., according to the progress of the pregnancy.
    •  Note: Until version 1.2.2, p0 was required, but is not required in version 2. Please remove p0.
  •  If you are assigning multiple textures to a single mesh according to actor's weight, as in CBBE Muscle Solution, then create like this:
    •  femalebody_2_msn_p1.dds, ..., femalebody_2_msn_pX.dds, femalebody_3_msn_p1.dds ....

 

2. Place the normal map in the PNS folder

The sample normal map uses the same normal map for all Actors to which PNS is applied.

  • All normal maps used in PNS should be placed under "textures/PNS".
  • In the folder directly under textures/PNS, you can assign different normal maps for each Race.
  • The folder structure will be like: textures/PNS/<Race's EditorID>/<male|female>/<male|female>body_1_msn_pX.dds
  • Now, as an example, let us assign different normal maps to Nord and Redguard.
    • 2-1. First, check the EditorID of the race you wish to specially assign, such as SSEEdit.
      • In the example, Nord is "NordRace" and "NordRaceVampire" and Redguard is "RedguardRace" and "RedguardRaceVampire".
        • The vampire race is treated as a separate race.
    • 2-2. Create a folder in the textures/PNS folder with the name of the confirmed EditorID.
      • As a result, your textures folder will contain...
        • Spoiler
          • textures/PNS/_Default
          • textures/PNS/NordRace
          • textures/PNS/NordRaceVampire
          • textures/PNS/RedguardRace
          • textures/PNS/RedguardRaceVampire
          • textures/PNS/ArgonianRace
          • textures/PNS/ArgonianRaceVampire
          • textures/PNS/KhajiitRace
          • textures/PNS/KhajiitRaceVampire
      • _Default folder applies to Actors for which no Race folder exists.
        • In other words, it is easier if you place a generic normal map in _Default and create a folder for the species for which you want to use a different normal map.
    • 2-3. Place Use.txt, a file that references other Race folders.
      • For example, Vampires usually refer to the same normal map as non-Vampires. In this case, you could place a normal map for each in the PNS, but it would be tedious.
      • Another example is when you want to assign the same normal map to Nord and Redguard.
      • Use.txt file should be created in the Race folder you just created.
      • Open Use.txt and JUST fill in the EditorID of the race you are referring to. No spaces, line breaks, comments, etc. are allowed.
    • 2-4. Create "male" and "female" folders in the folder where you did not place the Use.txt file (i.e., the Race folder where you put the normal map).
      • As a result, your textures folder will contain...
        • Spoiler

          textures/PNS/_Default

          textures/PNS/NordRace/male

          textures/PNS/NordRace/female

          textures/PNS/NordRaceVampire/Use.txt

          textures/PNS/RedguardRace/male

          textures/PNS/RedguardRace/female

          textures/PNS/RedguardRaceVampire/Use.txt

          ...

    • 2-5. Place the normal maps in the folders for each tribe created in step 1.

 

3. Configuration of SPID

  • PregnancyNormalmapSwapper_DISTR.ini allows you to target the application of PNS effects.
  • The Spell to be distributed is "0x801~PregnancyNormalmapSwapper.esp". PNS effect will be applied to NPCs to which this Spell is distributed.
  • See reference (https://www.nexusmods.com/skyrimspecialedition/articles/6617) for SPID description.
  • Note 1: SPID does not apply to players. Whether or not it is applied to the player is set in Config.json, described below.
  • Note 2: If you comment out all lines, you may CTD when you select an actor in console. If this is the case, please move DISTR.ini or otherwise prevent it from being loaded into SPID.

 

4. Configuration of Config.json

  • Config.json is a file that configures PNS behavior.
  • There is no MCM in PNS (because the author is a lazy bastard). All settings are determined by Config.json and the aforementioned SPID.
  • MorphName: The name of the Morph that PNS refers to.
  • MorphMode: It should be the same as the value in Racemenu/SKSE/Plugins/skee64.ini. Probably 0 if you don't remember changing it.
    • It makes no difference if you enter the wrong value. maybe.
  • MorphValueMin/Max: The minimum and maximum values that MorphName can take. If the actual value exceeds this value, PNS will round to this value.
  • NumberOfPartitions: X for p1~pX created in step 1. If the sample normal map is used, it is 5.
  • EnablePlayer: If "1", Apply the effects of PNS to the player. If "0", it does not apply to the player.
  • IgnoreMorphKeys: Of the mods that modify Morph, this is the source that PNS ignores.
    • Morph can be changed from multiple mods. Pregnancy mods are an example, and you are probably reading this now for that reason, but actually Racemenu is one of them.
    • IgnoreMorphKeys specifies who changes Morphs that have nothing to do with pregnancy, such as Racemenu.
    • The default Config.json specifies RaceMenu keys as invalid keys for users of CBBE family body types.
  • NodeNames: This is the list of node name needed to apply the normal map. This depends on the body type mod and equipment mod you are using.
    • We have listed the common NodeName, but if there is a body type or equipment that does not apply with it, please check the contents of that mesh file as shown in the following image.
    • Spoiler

      image.png.aba000d586a87131184a32236e14bc40.png

  • ForceUpdateKey: This key immediately updates the effect of PNS. The default is LShift+LAlt+Enter. See key codes(https://ck.uesp.net/wiki/Input_Script) (input decimal).
  • UpdateInterval: If a value greater than 0 is specified, it is updated every that number of seconds. 0 or less disables this feature.
    • Even if disabled, updates are performed at specific times.
  • EnableDebugMode: If "1", outputs PNS logs to Papyrus log. Also available Morph change function for debugging. "0" to disable.
    • To change morph for debugging, crosshair the target and press "LAlt+RArrow" to increase MorphName or "LShift+LAlt+RArrow" to decrease MorphName.
    • If there is nothing in the cross hairs, the same effect is applied to the player.
  • DebugMorphChangeMult: The amount of change due to the above functions.

 

Congratulations! That is all.

Note that PNS does not work immediately after a new game. It will work once you save and load the game.

 

日本語導入手順

Spoiler

【概要】
プレイヤー及び任意のNPCのmorphの値に応じてノーマルマップを差し替えるmodです。
妊娠機能はあるがノーマルマップ差し替え機能はない古めの妊娠mod向けに作成されました。
それ以外の機能はありません。
その割に導入手順が多く面倒なmodです。

このMODは不安定な可能性があります。真面目なプレイでこのMODを使用しないでください。
導入前に、あなたのセーブデータをバックアップしてください。
1.2.2以前のバージョンを使用していた場合は、ニューゲームを強く推奨します。
同時に「Clean Save Auto-reloader(https://www.nexusmods.com/skyrimspecialedition/mods/88219)」の使用をおすすめします。


【導入手順-恐ろしく複雑で長ったらしく難解】
注意:導入する前に、アンインストール手順を軽く見てください。もしあなたがアンインストールする可能性があり、手順を見てうんざりした場合は、導入しない方がいいです。
一応手順はありますが、基本的にmid-gameでのアンインストールは推奨しません。

1.ノーマルマップを用意します。
サンプルとして、dw's Pregnant Normal Maps for CBBE 3BAからFair Skin Complexion (Curvy)のものを作成しました。
あなたがこのサンプルファイルのみで満足できるのであれば、手順3まで飛ばしてください。
枚数は何枚でも構いません。5枚用意するのが面倒なら、3でも2でも構いません。
もしあなたがプレイヤーやNPCに異なるスキンテクスチャを使用しており、それらすべてにPNSを適用したいのであれば、それらすべてのノーマルマップを作成してください。
・ファイル名:「<male|female>body_1_msn_pX.dds」
 ・malebody_1_msn/femalebody_1_msnについては、見た通り男性ならmale、女性ならfemaleです。
  ・注意1:ここでの性別はSkyrim本来の性別です。SexLab Frameworkでは独自に性別を設定できますが、この性別ではありません。
  ・注意2:Skyrimではアルゴニアンやカジートは人間Raceと異なるファイル名になっていますが、PNSではすべて(fe)malebody_1_msnに統一してください。
  ・注意3:用意するノーマルマップの枚数はすべてのRaceで統一してください。例えば、Nordのみ5枚で他のRaceは3枚だけで済ませるようなことはできません。
 ・pXは、妊娠の進行度に応じて、p1,p2,p3,...としてください。
  ・注意:バージョン1.2.2まではp0が必須でしたが、バージョン2では不要です。後述しますが、p0は削除してください。
・もしあなたが CBBE Muscle Solutionのように1つのmeshに大してweightに応じた複数のテクスチャを割当てている場合は、femalebody_2_msn_p1.dds, femalebody_2_msn_p2.dds...のように作成してください。

2.ノーマルマップをPNSのフォルダに配置します。
この例では、対象となるすべてのActorでこのノーマルマップを利用します。
具体的な仕様は以下の通りです。
・PNSで使用するノーマルマップは、すべて「textures/PNS」以下に配置します。
・textures/PNS直下のフォルダでは、Raceごとに異なるノーマルマップを割当てることができます。
・ここで、例としてNordとRedguardに異なるノーマルマップを割当ててみます。
 2-1.まず、SSEEdit等で特別に割当てたいRaceのEditorIDを確認します。
  ・例の場合、Nordは「NordRace」と「NordRaceVampire」、Redguardは「RedguardRaceとRedguardRaceVampire」です。
  ・NOTE:吸血鬼種族は別の種族として扱われます。
 2-2.確認したEditorIDの名前のフォルダをtextures/PNSフォルダに作成します。
  ・この結果、あなたのtexturesフォルダには。。。
    textures/PNS/_Default
    textures/PNS/NordRace
    textures/PNS/NordRaceVampire
    textures/PNS/RedguardRace
    textures/PNS/RedguardRaceVampire
    textures/PNS/ArgonianRace
    textures/PNS/ArgonianRaceVampire
    textures/PNS/KhajiitRace
    textures/PNS/KhajiitRaceVampire
   が存在するはずです。
  ・_Defaultフォルダは、Raceフォルダが存在しないActorに適用されます。
   つまり、_Defaultに一般的なノーマルマップを配置し、別のノーマルマップを使用したい種族のフォルダを作成すれば楽です。
 2-3.次に「Use.txt」を配置します。Use.txtは、他のRaceのフォルダを参照するためのファイルです。
  ・例えば、Vampireは大抵非Vampireと同じノーマルマップを参照しています。この場合、PNSでもそれぞれにノーマルマップを配置してもいいですが、面倒です。
  ・他の例として、NordとRedguardに同じノーマルマップを割当てたいときも同じです。
  ・このような場合にUse.txtを利用します。
  ・Use.txtは、先ほど作成したRaceのフォルダ内に作成します。
  ・Use.txtを開き、ただ参照先の種族のEditorIDだけを記入してください。スペースや改行、コメントは禁止です。
  ・例えばNordRaceVampireにNordRaceと同じノーマルマップを割当てたいのであれば、NordRaceVampireフォルダにUse.txtを作成し、その中には「NordRace」と記述してください。
 2-4.Use.txtを配置しなかったフォルダ(つまりノーマルマップを置くRaceのフォルダ)に「male」と「female」フォルダを作成してください。
 2-5.手順1で作成した各種族のフォルダにノーマルマップを配置します。
  ・注意:各フォルダには、使用するノーマルマップ以外のファイルを一切置かないでください。編集用のファイルやバックアップ用のファイルを置いておきたくなるかもしれませんが、それも置いてはいけません。

3.SPIDの設定
 ・PregnancyNormalmapSwapper_DISTR.iniでは、PNSの効果を適用する対象を絞ることができます。
 ・配布するSpellは「0x801~PregnancyNormalmapSwapper.esp」です。このSpellが配布されたNPCにPNSの効果が適用されます。
 ・SPIDの記述についてはリファレンス(https://www.nexusmods.com/skyrimspecialedition/articles/6617)を参照してください。
 ・注意1:SPIDはプレイヤーは対象となりません。プレイヤーに適用させるかどうかは、後述のConfig.jsonで設定します。
 ・注意2:すべての行をコメントアウトすると、ConsoleでActorを選択した際にCTDするかもしれません。その場合は、DISTR.iniを移動させるなどしてSPIDに読み込まれないようにしてください。

4.Config.jsonの設定
 ・Config.jsonはPNSの挙動を設定するファイルです。
 ・PNSにはMCMはありません(作者がめんどくさがりなので)。すべての設定はConfig.jsonと前述のSPIDで決定します。
 ・MorphName:PNSが参照するMorphの名前です。
 ・MorphMode:Racemenu/SKSE/Plugins/skee64.iniの値と同じにしてください。おそらくあなたが変更した記憶がないなら0だと思います。
 ・MorphValueMin/Max:MorphNameが取りうる最小値と最大値です。実際の値がこの値を超えても、PNSはこの値に丸めます。
 ・NumberOfPartitions:手順1で作成したp1~pXのXです。サンプルのノーマルマップを利用した場合は5です。
 ・EnablePlayer:PNSの効果をプレイヤーに適用します。
 ・IgnoreMorphKeys:Morphを変更するModのうち、PNSが無視するソースです。
  Morphは複数のModから変更される可能性があります。妊娠Modがその例で、あなたもそのために今これを読んでいると思いますが、実際にはRacemenuもその一つです。IgnoreMorphKeysでは、Racemenuのような、妊娠とは関係ないMorphの変更者を指定します。
  デフォルトでは、CBBE系列の体型を利用しているユーザー向けに、RaceMenuのものを無効なキーとして指定しています。
 ・NodeNames:ノーマルマップを適用するために必要なNode名です。これは、あなたが使用している体型modや、装備modによって異なります。
  デフォルトでありがちなNodeNameを羅列していますが、もしそれで適用されない体型や装備がある場合は、以下の画像のようにそのmeshファイルの中身を確認してみてください。
 ・ForceUpdateKey:PNSの効果を直ちに更新するキーです。デフォルトではLShift+LAlt+Enterです。キーコードは以下を参照してください。(10進数です)
https://ck.uesp.net/wiki/Input_Script
 ・UpdateInterval:0より大きい値を指定した場合、その秒数毎に更新します。0以下で無効化します。無効化した場合でも特定のタイミングで更新されます。
 ・EnableDebugMode:1ならPapyrusログにPNSのログを出力します。また、デバッグ用のMorph変更機能も使用可能です。0で無効。
  ・デバッグ用のMorph変更は、対象にクロスヘアを当て、「LAlt+RArrow」でMorphNameを増加、「LShift+LAlt+RArrow」でMorphNameを減少させます。
  クロスヘアに何もない場合、プレイヤーに同様の効果を適用します。
  ・DebugMorphChangeMult:上記機能による変化量です。
5.以上です。なお、PNSはニューゲーム時すぐには動作しません。いったんセーブし、ロードすると動作します。


日本語でメッセージ送ってくれたら個別に対応します。誹謗中傷はやめてね♥

 

Uninstall

Spoiler

 

  1. Disable PregnancyNormalmapSwapper_DISTR.ini.
    • Spell cannot be deleted without disabling it.
  2. In Config.json, set "EnableDebugMode" to 1.
  3. Start the game, load the saved data and type "coc qasmoke" in the console.
  4. Hold down Force Update Key (LShift + LAlt + Enter by default) for at least 5 seconds. Release to start uninstallation.
  5. When a message box appears indicating that the uninstallation is complete, save the data and exit the game.
  6. Disable PNS in your mod manager.
  7. Clean with Resaver, etc. as desired.

 

As for the NPCs with incorrect textures, this can be fixed by reequipping them with body armor.

 

 

Update from ver1.2.2

New game is strongly recommended. 

With the change in the method of applying effects, there will be an additional process to delete past effects, which will increase the process slightly.

 

 

Spoiler
  1. Back up Config.json and DISTR.ini
  2. Install the latest version of PNS.
  3. Integrate the settings in Config.json. Your old version's settings should remain the same, but add the added items. In no particular order.
  4. Overwrite DISTR.ini with your back up file.

 

Uninstall data prior to version 1.2.2

  • You cannot disable this mod with the ModManager. If you want to disable it completely, please play a new game.
  • This procedure repairs the texture anomaly and removes it from PNS monitoring.
  • Approaching (loading) an NPC affected by PNS removes the effects of this mod.
Spoiler
  1. Update the PNS with reference to "Update from ver1.2.2"
  2. In Config.json, set NumberOfPartitions to 0.
  3. Disable PregnancyNormalmapSwapper_DISTR.ini.
  4. Then play as normal. NPCs with abnormal textures will return to normal when putting on and taking off equipment, etc.
    • There is a process to bring them back, but it cannot be applied if they were mounted at the time of removal.

 

 

 

Known issues

I don't know yet as I just got version 2. It will probably be full of them.

At least the problems with version 1 have been mostly resolved.

 

・Swapping normal maps are tooooooooooooooooo delayed.

 

When reporting a bug, please complete the following

  • PapyrusLog (Set EnableDebugMode to 1 in Config.json)→don't forget to use spoile
  • Skyrim version
  • PNS version(Older versions are not supported.)

 

 

For Modders

Spoiler

This mod basically updates the normal map only when the equipment is put on or taken off.*1
If you want to update at any given time, need to send an ModEvent from your mod.
Copy and paste the following three lines of commands where necessary.

kActor should be the Actor to be processed.

If kActor is none, all Actors currently enabled with MagicEffect will attempt to update.

int eid = ModEvent.Create("PNSUpdateRequest")
ModEvent.PushForm(eid, kActor)
ModEvent.Send(eid)

Changes to SLIF_Scale.psc are no different.

This mod works as a soft dependency, so even if your mod's users don't have this mod installed, no errors, CTDs, PTSDs, SDGs, or exploding PCs will occur.

 

 

 

Credits

Murphiee https://www.loverslab.com/profile/546212-murphiee/

  - I referred to their script.

jjabrams420 https://www.loverslab.com/profile/1668396-jjabrams420/

 -  He found great (clean and useful) information from the vast ocean of the Internet.

donnerwetter https://www.loverslab.com/profile/43136-donnerwetter/

  - Their wonderful textures kept me motivated.

DeepL https://www.deepl.com/ja/translator

  - This document is translated by DeepL.

 

 

Permission

You can modify and redistributed freely within LoversLab.

 

 

 

 

 

 

 


  • Submitter
  • Submitted
    08/17/2022
  • Category
  • Requires
    PapyrusUtil SE, RaceMenu(NiOverride), Spell Perk Item Distributor
  • Regular Edition Compatible
    No

 

Link to comment

This looks exactly like what people have been asking for ever since I released my mod. Very nice! Don't have time to test it right now, but if it works and people start using this mod with my maps, I might look into providing FOMOD installer support in the future, negating the need for manually moving files around.

Link to comment

 

18 hours ago, donnerwetter said:

This looks exactly like what people have been asking for ever since I released my mod. Very nice! Don't have time to test it right now, but if it works and people start using this mod with my maps, I might look into providing FOMOD installer support in the future, negating the need for manually moving files around.

 

Thanks!

I wish my mod will work as expected.

Link to comment

Just tried out this mod. Looks VERY promising, BUT:

 

Got an odd issue with this and SLIF: After installing it no morphs that are being applied in the "DEFAULT MODUS" category has any effect on the character anymore. Only morphs that are being applied using "MORPH MODUS" has any effect. Note that I am just talking about the node scaling here and not about the textures.

 

Is this mod only supposed to work with scaling through SLIF "MORPH MODUS"? As it stands right now, all it does is that it breaks how I use SLIF in my games.

 

UPDATE: Everything works perfectly when just using the debug keys, but SLIF integration seems troublesome.

 

UPDATE 2: Using the original SLIF_Scale.pex from Inflation Framework (while this mod is still installed) makes morphs in DEFAULT MODUS work again. But textures are not applied (obviously), since your mod event is not sent out.

 

UPDATE 3:

 

Did some serious investigation and I believe I found the cause: I don't think the source code distributed with SLIF is the latest version!!

 

If I decompile "SLIF_Scale.pex" from the original SLIF using champillion and compare it to the source file, it is vastly different. For example, take a look at the difference of one of the functions called "SetBodyMorphsByArray":

 

SOURCE PROVIDED IN SLIF:

function SetBodyMorphsByArray(Actor kActor, String slif, String path, bool isPlayer) global
	if (path != "")
		String json            = "SexLab Inflation Framework/Bodymorphs.json"
		String[] breast_morphs = JsonUtil.PathMembers(json, ".breasts.")
		String[] belly_morphs  = JsonUtil.PathMembers(json, ".belly.")
		String[] butt_morphs   = JsonUtil.PathMembers(json, ".butt.")
		bool has_breasts       = StorageUtil.HasFloatValue(kActor, slif + "NPC L Breast") || StorageUtil.HasFloatValue(kActor, slif + "NPC R Breast")
		bool has_belly         = StorageUtil.HasFloatValue(kActor, slif + "NPC Belly")
		bool has_butt          = StorageUtil.HasFloatValue(kActor, slif + "NPC L Butt") || StorageUtil.HasFloatValue(kActor, slif + "NPC R Butt")
		float breast_value     = (StorageUtil.GetFloatValue(kActor, slif + "NPC L Breast", 1.0) + StorageUtil.GetFloatValue(kActor, slif + "NPC R Breast", 1.0)) / 2
		float belly_value      = StorageUtil.GetFloatValue(kActor, slif + "NPC Belly", 1.0)
		float butt_value       = (StorageUtil.GetFloatValue(kActor, slif + "NPC L Butt", 1.0) + StorageUtil.GetFloatValue(kActor, slif + "NPC R Butt", 1.0)) / 2
		String[] morphs
		if (path == ".breasts.")
			morphs = breast_morphs
		elseIf (path == ".belly.")
			morphs = belly_morphs
		elseIf (path == ".butt.")
			morphs = butt_morphs
		endIf
		int size = morphs.length
		int idx  = 0
		while(idx < size)
			String morphName = morphs[idx]
			if (SLIF_Morphs.GetValue("BodyMorph", path, morphName, 0, isPlayer, 0.0) > 0.0)
				SetBodyMorphs(kActor, slif, json, isPlayer, morphName, breast_morphs, belly_morphs, butt_morphs, has_breasts, has_belly, has_butt, breast_value, belly_value, butt_value)
			endIf
			idx += 1
		endWhile
		UpdateMorphs(kActor)
	endIf
endFunction

 

DECOMPILED CODE:

function SetBodyMorphsByArray(Actor kActor, String slif, String path, Bool IsPlayer) global

	if path != ""
		String[] morphs
		String json = slif_morphs.GetFileName()
		String[] breast_morphs = jsonutil.PathMembers(json, ".breasts.")
		String[] belly_morphs = jsonutil.PathMembers(json, ".belly.")
		String[] butt_morphs = jsonutil.PathMembers(json, ".butt.")
		Bool has_breasts = storageutil.HasFloatValue(kActor as form, slif + "NPC L Breast") || storageutil.HasFloatValue(kActor as form, slif + "NPC R Breast")
		Bool has_belly = storageutil.HasFloatValue(kActor as form, slif + "NPC Belly")
		Bool has_butt = storageutil.HasFloatValue(kActor as form, slif + "NPC L Butt") || storageutil.HasFloatValue(kActor as form, slif + "NPC R Butt")
		Float breast_value = (storageutil.GetFloatValue(kActor as form, slif + "NPC L Breast", 1.00000) + storageutil.GetFloatValue(kActor as form, slif + "NPC R Breast", 1.00000)) / 2 as Float
		Float belly_value = storageutil.GetFloatValue(kActor as form, slif + "NPC Belly", 1.00000)
		Float butt_value = (storageutil.GetFloatValue(kActor as form, slif + "NPC L Butt", 1.00000) + storageutil.GetFloatValue(kActor as form, slif + "NPC R Butt", 1.00000)) / 2 as Float
		if path == ".breasts."
			morphs = breast_morphs
		elseIf path == ".belly."
			morphs = belly_morphs
		elseIf path == ".butt."
			morphs = butt_morphs
		endIf
		Int size = morphs.length
		Int idx = 0
		while idx < size
			String morphName = morphs[idx]
			if slif_morphs.GetValue("BodyMorph", path, morphName, 0, IsPlayer, 0.000000) > 0.000000
				SLIF_Scale.SetBodyMorphs(kActor, slif, json, IsPlayer, morphName, breast_morphs, belly_morphs, butt_morphs, has_breasts, has_belly, has_butt, breast_value, belly_value, butt_value)
			endIf
			idx += 1
		endWhile
		SLIF_Scale.UpdateMorphs(kActor)
	endIf
endFunction

 

The "file" that is hardcoded in the provided source is the configuration that is used to support "DEFAULT MODUS", making it obvious why it is not working.

 

I think we need to contact the author of SLIF to get the latest sources published, so you can modify that instead.

 

I did manage to recompile the decompiled file, but I had to simply "re-hard-code" the bodymorph file to my own json settings as I could not get it to compile otherwise. In this recompilation I included your changes to the original source, and BAM, it is now working. So this is definitely the cause.

 

UPDATE 4:

 

GOOD NEWS: The source files distributed with SLIF for LE seems to be updated to the latest version. Maybe we just need to use those instead. I do not have time to test this today, but will tomorrow after work, unless the issue has already been resolved by then. :)

 

Edited by leakim
Link to comment
4 hours ago, leakim said:

Just tried out this mod. Looks VERY promising, BUT:

 

Got an odd issue with this and SLIF: After installing it no morphs that are being applied in the "DEFAULT MODUS" category has any effect on the character anymore. Only morphs that are being applied using "MORPH MODUS" has any effect. Note that I am just talking about the node scaling here and not about the textures.

 

Is this mod only supposed to work with scaling through SLIF "MORPH MODUS"? As it stands right now, all it does is that it breaks how I use SLIF in my games.

 

UPDATE: Everything works perfectly when just using the debug keys, but SLIF integration seems troublesome.

 

UPDATE 2: Using the original SLIF_Scale.pex from Inflation Framework (while this mod is still installed) makes morphs in DEFAULT MODUS work again. But textures are not applied (obviously), since your mod event is not sent out.

 

UPDATE 3:

 

Did some serious investigation and I believe I found the cause: I don't think the source code distributed with SLIF is the latest version!!

 

If I decompile "SLIF_Scale.pex" from the original SLIF using champillion and compare it to the source file, it is vastly different. For example, take a look at the difference of one of the functions called "SetBodyMorphsByArray":

 

SOURCE PROVIDED IN SLIF:

function SetBodyMorphsByArray(Actor kActor, String slif, String path, bool isPlayer) global
	if (path != "")
		String json            = "SexLab Inflation Framework/Bodymorphs.json"
		String[] breast_morphs = JsonUtil.PathMembers(json, ".breasts.")
		String[] belly_morphs  = JsonUtil.PathMembers(json, ".belly.")
		String[] butt_morphs   = JsonUtil.PathMembers(json, ".butt.")
		bool has_breasts       = StorageUtil.HasFloatValue(kActor, slif + "NPC L Breast") || StorageUtil.HasFloatValue(kActor, slif + "NPC R Breast")
		bool has_belly         = StorageUtil.HasFloatValue(kActor, slif + "NPC Belly")
		bool has_butt          = StorageUtil.HasFloatValue(kActor, slif + "NPC L Butt") || StorageUtil.HasFloatValue(kActor, slif + "NPC R Butt")
		float breast_value     = (StorageUtil.GetFloatValue(kActor, slif + "NPC L Breast", 1.0) + StorageUtil.GetFloatValue(kActor, slif + "NPC R Breast", 1.0)) / 2
		float belly_value      = StorageUtil.GetFloatValue(kActor, slif + "NPC Belly", 1.0)
		float butt_value       = (StorageUtil.GetFloatValue(kActor, slif + "NPC L Butt", 1.0) + StorageUtil.GetFloatValue(kActor, slif + "NPC R Butt", 1.0)) / 2
		String[] morphs
		if (path == ".breasts.")
			morphs = breast_morphs
		elseIf (path == ".belly.")
			morphs = belly_morphs
		elseIf (path == ".butt.")
			morphs = butt_morphs
		endIf
		int size = morphs.length
		int idx  = 0
		while(idx < size)
			String morphName = morphs[idx]
			if (SLIF_Morphs.GetValue("BodyMorph", path, morphName, 0, isPlayer, 0.0) > 0.0)
				SetBodyMorphs(kActor, slif, json, isPlayer, morphName, breast_morphs, belly_morphs, butt_morphs, has_breasts, has_belly, has_butt, breast_value, belly_value, butt_value)
			endIf
			idx += 1
		endWhile
		UpdateMorphs(kActor)
	endIf
endFunction

 

DECOMPILED CODE:

function SetBodyMorphsByArray(Actor kActor, String slif, String path, Bool IsPlayer) global

	if path != ""
		String[] morphs
		String json = slif_morphs.GetFileName()
		String[] breast_morphs = jsonutil.PathMembers(json, ".breasts.")
		String[] belly_morphs = jsonutil.PathMembers(json, ".belly.")
		String[] butt_morphs = jsonutil.PathMembers(json, ".butt.")
		Bool has_breasts = storageutil.HasFloatValue(kActor as form, slif + "NPC L Breast") || storageutil.HasFloatValue(kActor as form, slif + "NPC R Breast")
		Bool has_belly = storageutil.HasFloatValue(kActor as form, slif + "NPC Belly")
		Bool has_butt = storageutil.HasFloatValue(kActor as form, slif + "NPC L Butt") || storageutil.HasFloatValue(kActor as form, slif + "NPC R Butt")
		Float breast_value = (storageutil.GetFloatValue(kActor as form, slif + "NPC L Breast", 1.00000) + storageutil.GetFloatValue(kActor as form, slif + "NPC R Breast", 1.00000)) / 2 as Float
		Float belly_value = storageutil.GetFloatValue(kActor as form, slif + "NPC Belly", 1.00000)
		Float butt_value = (storageutil.GetFloatValue(kActor as form, slif + "NPC L Butt", 1.00000) + storageutil.GetFloatValue(kActor as form, slif + "NPC R Butt", 1.00000)) / 2 as Float
		if path == ".breasts."
			morphs = breast_morphs
		elseIf path == ".belly."
			morphs = belly_morphs
		elseIf path == ".butt."
			morphs = butt_morphs
		endIf
		Int size = morphs.length
		Int idx = 0
		while idx < size
			String morphName = morphs[idx]
			if slif_morphs.GetValue("BodyMorph", path, morphName, 0, IsPlayer, 0.000000) > 0.000000
				SLIF_Scale.SetBodyMorphs(kActor, slif, json, IsPlayer, morphName, breast_morphs, belly_morphs, butt_morphs, has_breasts, has_belly, has_butt, breast_value, belly_value, butt_value)
			endIf
			idx += 1
		endWhile
		SLIF_Scale.UpdateMorphs(kActor)
	endIf
endFunction

 

The "file" that is hardcoded in the provided source is the configuration that is used to support "DEFAULT MODUS", making it obvious why it is not working.

 

I think we need to contact the author of SLIF to get the latest sources published, so you can modify that instead.

 

I did manage to recompile the decompiled file, but I had to simply "re-hard-code" the bodymorph file to my own json settings as I could not get it to compile otherwise. In this recompilation I included your changes to the original source, and BAM, it is now working. So this is definitely the cause.

 

UPDATE 4:

 

GOOD NEWS: The source files distributed with SLIF for LE seems to be updated to the latest version. Maybe we just need to use those instead. I do not have time to test this today, but will tomorrow after work, unless the issue has already been resolved by then. :)

 

 

Thanks for the very detailed report.
In the meantime, I have extracted SLIF_Scale.psc from the LE version based on your report and recompiled it. (Hopefully this solves the problem.)
Upon closer inspection, the SE version of the SLIF has SLIF_Version_Control.pex but does not contain the psc, so I am pretty sure that the pex and psc are not identical, as you pointed out.

To tell the truth, I do not clearly understand how it works regarding SLIF.
SLIF_Scale included in this mod just searches for NiOverride.UpdateModelWeight from the psc included in SLIF SE ver.1.2.2beta and adds the necessary processing to trigger my mod.
In any case, it seems I need to better understand how SLIF works for more stable compatibility.
 

SLIF issue fix.zip

Link to comment

Can this be flagged as ESL (aka ESPFE)? I found that the default method included in the SGO Integration Fork produced the glowy skin issues, which caused the skin on the torso to seam at the neck. Hoping this solves that... but my load order is packed and I need to ESLify if I'm going to use it.

Link to comment
12 hours ago, handroid said:

 

Thanks for the very detailed report.
In the meantime, I have extracted SLIF_Scale.psc from the LE version based on your report and recompiled it. (Hopefully this solves the problem.)
Upon closer inspection, the SE version of the SLIF has SLIF_Version_Control.pex but does not contain the psc, so I am pretty sure that the pex and psc are not identical, as you pointed out.

To tell the truth, I do not clearly understand how it works regarding SLIF.
SLIF_Scale included in this mod just searches for NiOverride.UpdateModelWeight from the psc included in SLIF SE ver.1.2.2beta and adds the necessary processing to trigger my mod.
In any case, it seems I need to better understand how SLIF works for more stable compatibility.
 

SLIF issue fix.zip 9.1 kB · 14 downloads

 

Can verify that this fixes the issue! :)

 

Thanks.

Link to comment
18 hours ago, MysticDaedra said:

Can this be flagged as ESL (aka ESPFE)? I found that the default method included in the SGO Integration Fork produced the glowy skin issues, which caused the skin on the torso to seam at the neck. Hoping this solves that... but my load order is packed and I need to ESLify if I'm going to use it.

 

Probably possible.
I would like to add esl flag in the next version and then publish it.
However, adding esl flag in mid game may cause problems. We will not know about this until we try it.

Link to comment
7 hours ago, leakim said:

I have a dream that one day this mod will be compatible with: 

 

 

(by simply disabling the muscle behavior when pregnant).

 

Hey, one can dream? :P

 

I would like to try.
I don't know if I can do it, so don't hold your breath too much.

Link to comment

Update 1.1.0 released.

IgnoreMorphKeys is intended to make changes to PregnancyBelly in RaceMenu unaffected by my mod.

If you are using BHUNP, etc., please check and rewrite the key for each of them. (I use CBBE 3BA, so I do not know what key other body mods use.)

If you do not use this feature, there is no need to change it.

Edited by handroid
Link to comment
33 minutes ago, Suke23 said:

Pretty nice mod! I'm guessing this mod doesn't work with Fill her Up, since fill her up links with SLIF but doesn't exactly show up in the SLIF menu? Would it be possible to add separate compatibility?

 

There is a patch for Fill Her Up Baka Edition ver1.76. I don't know where the problem is, but this mod does not seem to work with SLIF properly.

As for the original FHU, I have never used it and have no patch for it.
If you can compile psc, try these steps.
1. find NiOverride.UpdateModelWeight(xxxx) in all psc files in FHU. (xxxx is a variable name like kActor, etc.)

2.Add the following three lines of command immediately after that command.
 

Quote

int eid = ModEvent.Create("PNSUpdateRequest")
ModEvent.PushForm(eid, xxxx)
ModEvent.Send(eid)

 

3. Compile them.

Patch for FHU Baka Edition 1.76.7z

Link to comment
18 minutes ago, urbon said:

Hi! what do you  mean with this? 

  • HDT stuff goes wild when swapping texture.
    • Same as above.

 

The hair, armor, etc. corresponding to HDT will flip for a moment, just as when normal armor is put on and taken off.
It is not the "boobs break dancing" event that we often saw in the LE version of HDT, but rather a momentary one.

 

 

16 minutes ago, applesandmayo said:

Does this work for any mod that affects the Pregnancy slider? So would Fill Her Up be compatible out of the box with this?

There are two sliders for Pregnancy, one to change the Scale of the Node and one to change the Morph.
My mod only supports Morph. Therefore, if Fill Her Up is implemented using the Node one, my mod will not work.
Personally, I do not want to use deformation by Node because it is very uncomfortable.

 

 

13 minutes ago, Debaster said:

Great mod with beast race support! どうもありがとうございます!

 

  Reveal hidden contents

embrace monke

image.png.b542efdfb7fa8ab94ba10819ff1db1e2.png

 

どういたしまして!

I am relieved that it seems to be working as expected.

Link to comment
11 hours ago, applesandmayo said:

Does this work for any mod that affects the Pregnancy slider? So would Fill Her Up be compatible out of the box with this?

 

11 hours ago, handroid said:

 

There is a patch for Fill Her Up Baka Edition ver1.76. I don't know where the problem is, but this mod does not seem to work with SLIF properly.

As for the original FHU, I have never used it and have no patch for it.
If you can compile psc, try these steps.
1. find NiOverride.UpdateModelWeight(xxxx) in all psc files in FHU. (xxxx is a variable name like kActor, etc.)

2.Add the following three lines of command immediately after that command.
 

 

3. Compile them.

Patch for FHU Baka Edition 1.76.7z 29.47 kB · 8 downloads

 

This DOES work out of the box with FHU Baka Edition...

 

At least in the way I use it, it simply uses SLIF "DEFAULT MODUS" to scale the belly. (In order for it to do this you must disable the checkbox "Body Morph" indicating that you "use LE", even if you're on SE!). All this really means is that it uses "DEFAULT MODUS" in SLIF. In order for that to work properly you must configure SLIF so it knows which nodes to scale. This is not configured by default in SLIF. The upside of this is that it allows to scale other nodes as well when applied.

 

Just saying that all the mods that I use that scales the belly uses SLIF "DEFAULT MODUS" and they all work perfectly with this mod. Even the Mysterious Potion from Sexlab Survival works. It's absolutely perfect!

 

Spoiler

image.thumb.jpeg.048ebdfbe00a57f87f8739e76bdda8b6.jpeg

image.thumb.jpeg.2b6f784ab42184ca639a2e85d6d793c1.jpeg

 

 

Edited by leakim
Link to comment
2 hours ago, leakim said:

This DOES work out of the box with FHU Baka Edition...

 

At least in the way I use it, it simply uses SLIF "DEFAULT MODUS" to scale the belly. (In order for it to do this you must disable the checkbox "Body Morph" indicating that you "use LE", even if you're on SE!). All this really means is that it uses "DEFAULT MODUS" in SLIF. In order for that to work properly you must configure SLIF so it knows which nodes to scale. This is not configured by default in SLIF. The upside of this is that it allows to scale other nodes as well when applied.

 

Just saying that all the mods that I use that scales the belly uses SLIF "DEFAULT MODUS" and they all work perfectly with this mod. Even the Mysterious Potion from Sexlab Survival works. It's absolutely perfect!

So you're saying that SLIF is a requirement for this to function? Because I sorta hate slif.

Link to comment
58 minutes ago, applesandmayo said:

So you're saying that SLIF is a requirement for this to function? Because I sorta hate slif.

 

Looking at the source of this mod I think that any mod scales the "PregnancyBelly" node will theoretically work. But the mod event that @handroid mentioned would still need to be sent out.

 

Perhaps a nice addition to this mod would be a button you can press where it would simply recalculate the normal maps when pressed. In this way it would probably work with anything. Right now you can use ALT+LEFT/RIGHT to scale belly to "debug" the plugin. Could add an additional option to that combo to simply reapply texture.

Edited by leakim
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use