Jump to content

Mount and blade: Bannerlord sex mods?


Recommended Posts

34 minutes ago, BadListener said:

What I am planning is to hopefully use Harmony to make a prefix to the model and add OnChildConceivedEvent that calls the ChildConceived so that the model may track all pregnancy calls from any function the invokes MakePregnantAction

There seems to be a event for that already

            CampaignEvents.OnChildConceivedEvent

 

Link to comment
On 4/24/2020 at 4:57 PM, BadListener said:

Thinking of uploading it on Nexus Mod under a team name of bannerlordlab or something.

Anyways here is the fixed latest v1.1.1 file. This is for the latest Beta Version.
http://www.mediafire.com/file/ulwazw11wjj0vyu/CaptivityEvents.zip/file
 

Here is the old v1.1.0 file. This is for the latest non-beta Version.
https://www.mediafire.com/file/v7ki5i0qwtq5jpp/CaptivityEvents1.2.0e.zip/file

 

 

Enjoy! Currently working on adding options and integration with MobLib.
 

@hzhou35

When you get a ransom popup for 1.2.0e version, the game crashes when you try to ransom yourself.  Declining the ransom offer prevents the CTD so you'd have to find other avenues of getting free.

Link to comment
3 minutes ago, Celedhring said:

When you get a ransom popup for 1.2.0e version, the game crashes when you try to ransom yourself.  Declining the ransom offer prevents the CTD so you'd have to find other avenues of getting free.

Ransom shouldn't be occurring. Maybe forgot to add the bug fix to 1.2.0 version.

Link to comment
1 hour ago, BadListener said:

@ioe23
Possibility, there is a private variable inside of PregnancyCampaignBehavior named  _heroPregnancies this variable gets set by it's own listeners, so I just added an hourly tick event campaign behavior that tracks the hero's own pregnancy from the bandits, allows me to set custom birth-time, as a workaround until I get it working again.

However in the actual code,


private void RefreshSpouseVisit(Hero hero)
{
  if (this.CheckAreNearby(hero, hero.Spouse) && MBRandom.RandomFloat <= Campaign.Current.Models.PregnancyModel.GetDailyChanceOfPregnancyForHero(hero))
  {
    MakePregnantAction.Apply(hero);
    this.ChildConceived(hero);
  }
}

private void CheckOffspringsToDeliver(Hero hero)
{
  PregnancyCampaignBehavior.Pregnancy pregnancy = this._heroPregnancies.Find((PregnancyCampaignBehavior.Pregnancy x) => x.Mother == hero);
  if (pregnancy == null)
  {
    hero.IsPregnant = false;
    return;
  }
  this.CheckOffspringsToDeliver(pregnancy);
}

This is the hourly tick events of the actual behavior.


private void ChildConceived(Hero mother)
{
  this._heroPregnancies.Add(new PregnancyCampaignBehavior.Pregnancy(mother, mother.Spouse, CampaignTime.DaysFromNow(Campaign.Current.Models.PregnancyModel.PregnancyDurationInDays)));
}

This is the private class in pregnancy model that sets it.


What I am planning is to hopefully use Harmony to make a prefix to the model and add OnChildConceivedEvent that calls the ChildConceived so that the model may track all pregnancy calls from any function the invokes MakePregnantAction


Can you consider making pregnancy variables configurable? Perhaps in an xml file or something?
 

Link to comment
39 minutes ago, YoungSailorGlitter said:


Can you consider making pregnancy variables configurable? Perhaps in an xml file or something?
 

Made the variables configurable through modlib if you can get pregnant from captives, and if it should calculate attractiveness chance, or go by a base precent chance,

how long the pregnancy should last is in modlib's for now but if my solution works it will be using the base campaign options day's of pregnancy similar to the length of pregnancy from a spouse.

Link to comment
On 4/3/2020 at 11:53 AM, dalenir said:

About modding textures:

Those are stored in .gtex files.

You can access them via Unity: https://support.gametextures.com/article/107-how-to-use-the-gt-toolkit-with-gtex

I don't know if it is the only way but this should give you all a hint how to mod them.

Hi. I just found this, this guy seems to have troubles but still found something....

https://forum.modme.co/threads/bannerlord-gtex-files.3132/

I was able to open the files in renderdoc, but that's as far as I was able to go to.

Hope someone knows the next  steps.

Link to comment

I posted this on Captivity Expanded but have not had a response. (Which is perfectly fine.) So, I figured I'd post it here. I thought a little about how a unified XML could be formed to be as simple, and dynamic, as possible.

 

<!-- KEY:

Extra Options:
1: One Handed
2: Two Handed
2: Polearm
4: Bow
5: Crossbow
6: Throwing
7: Riding
8: Athletics
9: Smithing
10: Scouting
11: Tactics
12: Roguery
13: Charm
14: Leadership
15: Trade
16: Steward
17: Medicine
18: Engineering
P: Pregnancy Chance
G: Gain Relationship with party leader (If captured by a faction leader.)
R: Reduce Relationship with party leader (If captured by a faction leader.)
H: Heal player
D: Damage player health
E: Gives player chance to escape captivity.
C: Close Menu
S: Steal items from player
A: Add item to player

To add new menus; add a string in the "sID" or "fID" of each option you desire to add, then add the same string in the "rID" of the corresponding subMenu and Options that it links to.
ADD SUB MENUES AND NEW OPTIONS WITH THE TABS BELOW:

<SubMenu rID="" attMod="" text=""/>
<Option rID="" events="" sID="" fID="" text=""/>

-->

<!-- Copy and paste "Event" to duplicate. -->
<Event name =""> <!-- Event name. -->
    <EventTags>S,N,B</EventTags> <!-- S=SFW,N=NSFW,B=Beast: Leave the ones you need. -->
    <Gender>M,F</Gender> <!-- M=Male,F=Female: Leave the ones you need. -->
    <Location>P,H,D,M,C,T</Location> <!-- P=Party,H=Hideout,D=Dungeon,M=MinorFactionBase,C=City Menu,T=Town Menu: Leave the ones you need. -->
    <MainMenu rID="main" attMod="" text=""> <!-- Main story text goes here. chance for option success or failure weighs items in "attMod"-->
    <Option rID="main" events="" sID="" fID="" text=""/> <!-- all branches must eventually lead to a "C" in "extra to end event"! -->
</Event>

You could build the menus and point to them by concating the Event name, with the rID of each built submenu. This way the content creator could build as many submenus and options as they desired.  things like the Event tags, Gender, Location could be exploded into an array and looped through with functions. This way you could add or remove as many tags as you wanted without breaking old xmls. Same for the attMod="" and events="". If you just placed the desired effect/s in those fields and separate them with a comma (events="p,d,16,12,12"), you could add or remove any of the options in the same way safely. This would also allow you to easily tweak the difficulty, event type weights, xp gain, and % chances in a config file. 

 

Hope it helps!

 

Edit: Actually, now that I think about it, if you want to inject menus into the towns and cities one would probably want to make a main "Activities" menu that is used to open all other events so the town menus don't get too cluttered, and you could also increase and reduce relationship with the town leaders with "G" and "R". 

Link to comment
32 minutes ago, SadSun said:

I posted this on Captivity Expanded but have not had a response. (Which is perfectly fine.) So, I figured I'd post it here. I thought a little about how a unified XML could be formed to be as simple, and dynamic, as possible.

 

You could build the menus and point to them by concating the Event name, with the rID of each built submenu. This way the content creator could build as many submenus and options as they desired.  things like the Event tags, Gender, Location could be exploded into an array and looped through with functions. This way you could add or remove as many tags as you wanted without breaking old xmls. Same for the attMod="" and events="". If you just placed the desired effect/s in those fields and separate them with a comma (events="p,d,16,12,12"), you could add or remove any of the options in the same way safely. This would also allow you to easily tweak the difficulty, event type weights, xp gain, and % chances in a config file. 

 

Hope it helps!

 

Edit: Actually, now that I think about it, if you want to inject menus into the towns and cities one would probably want to make a main "Activities" menu that is used to open all other events so the town menus don't get too cluttered, and you could also increase and reduce relationship with the town leaders with "G" and "R". 

Sounds Good, just fixing it with Harmony, should be moving on to the XML soon, will keep that in mind when designing. Adding in custom menu backgrounds too.
 

Link to comment
5 hours ago, BadListener said:

Sounds Good, just fixing it with Harmony, should be moving on to the XML soon, will keep that in mind when designing. Adding in custom menu backgrounds too

Cool, glad to help!  I did notice one bungle on my part tho.  The "attMod=""" Should probably be in the option tab. That way you can weight the chance of each option succeeding or failing based on what you pick and what your character is good or bad at. (That is, if the code allows.)

Link to comment
14 hours ago, BadListener said:

Made the variables configurable through modlib if you can get pregnant from captives, and if it should calculate attractiveness chance, or go by a base precent chance,

 

... so how about getting captives pregnant instead?  Just enemy lords (ladies, technically), obviously.

Link to comment

I've been tracking this game as a newcomer specifically because of this thread, and honestly, I can't even make heads or tails of what the deal with this game is other than the more.. so to phrase, "advanced" mods aren't gonna come so soon/fast because of the lack of official modding tools, so I just watch it in spare time?

 

But then this mod popped up, and now things are just gradually becoming more and more confusing to me because of how often the "internal" parts of the mod are discussed. I would rather things regarding M&B2:B be "compiled" somewhere for easy understanding, but I already both figure and imagine that it's not going to be that simple just yet.

Link to comment

I believe as far as a brothel mod at this point given the tools we have. it would be a text pop up menu type thing...  When we can get further down the line... crack the gtex files and tpac stuff.. maybe a inn like room  with workers and interactions  like talking to ppl  in the inns.. but hire or get work. depending on your playstyle. or perhaps a workshop space converted to a brothel and or have  sex workers  in the towns spaces.. camp followers to keep moral up

I bet it wouldnt be hard to convert  https://www.nexusmods.com/mountandblade2bannerlord/mods/903?tab=files&file_id=5166

to another kind  of honest work.. wink wink nudge nudge

Link to comment

Just an opinion - maybe, something like "captivity events" based on you renown and/or affiliation (just a traveler/mercenary/vassal/governor)? Being used by prison guards or just  sold to caravan, is more likely, if you are don't have a reputation and/or title, and something like forced marriage (tranfer to captor's clan and given a family status, mechanicaly works similar to "join army" to his party, release by build a good relations and some Charm checks/after party defeat but with low chance) is more suitable for noble. And things like that.

 

Just thinking - I doubt that this can be realized with current modding tools (more precisely, their absence AFAIK).

 

Maybe, if game has "culture" flag for events (i.e based on party leader culture type), this thing can be turned into "culture scenarios" for different cases.

 

Link to comment
1 hour ago, Lict said:

Just an opinion - maybe, something like "captivity events" based on you renown and/or affiliation (just a traveller/mercenary/vassal/governor)? Being used by prison guards or just  sold to caravan, is more likely, if you are don't have a reputation and/or title, and something like forced marriage (transfer to captor's clan and given a family status, mechanically works similar to "join army" to his party, release by build a good relations and some Charm checks/after party defeat but with low chance) is more suitable for noble. And things like that.

 

Just thinking - I doubt that this can be realized with current modding tools (more precisely, their absence AFAIK).

 

Maybe, if game has "culture" flag for events (i.e based on party leader culture type), this thing can be turned into "culture scenarios" for different cases.

 

I was thinking upon similar lines last night - the more renown you possess as a clan or individual the more likely it is that the individual lord is going to want to take you as his personal lover/slave.

I'm also trying to workout a list of interactions based upon your captor's personality traits - cruelty would see a female prisoner used by the common soldiery, whereas an honourable and merciful lord who likes the hero would be inclined to treat her honourably (and possibly seduce her as well) or a devious lord offer protection in exchange for money and then unofficially encourage his soldiers to have their fun.

Link to comment
48 minutes ago, HK47-2 said:

Does anyone know if its possible to be impregnated by lords or will it always be heroes that get removed?

Adding it in as a percentage chance, anyways if you noticed pregnancy is actually bugged in 1.3.0 because your children link doesn't get generated correctly since they changed up libs.

Link to comment
11 minutes ago, BadListener said:

Adding it in as a percentage chance, anyways if you noticed pregnancy is actually bugged in 1.3.0 because your children link doesn't get generated correctly since they changed up libs.

 

I can confirm that pregnancy doesn't work - I generated a new hero, got her into trouble with bandits as a test. Summer 3, "You learn you are with child" - waited the set number of days + a few - no child. (using 1.3 beta)

Link to comment
12 hours ago, Wien1938 said:

I was thinking upon similar lines last night - the more renown you possess as a clan or individual the more likely it is that the individual lord is going to want to take you as his personal lover/slave.

I'm also trying to workout a list of interactions based upon your captor's personality traits - cruelty would see a female prisoner used by the common soldiery, whereas an honourable and merciful lord who likes the hero would be inclined to treat her honourably (and possibly seduce her as well) or a devious lord offer protection in exchange for money and then unofficially encourage his soldiers to have their fun.


My XML format for creating new events, so you can write your own.

 

Have ..

 <xs:element ref="ReqHeroCaptorRelationAbove" minOccurs="0"   />
        <xs:element ref="ReqHeroCaptorRelationBelow" minOccurs="0"   />
        <xs:element ref="ReqCaptorTrait" minOccurs="0"   />

So you can write your own event, and say that 'for this event to occur Hero needs to be captive to a hero with Cruel trait' by adding
<ReqCaptorTrait>Cruel<ReqCaptorTrait/>

 

Also in the standard version your relation with your captor changes - for example if you let him fuck you.

In my XML format you can write an event that only will take place if your captor have Higher relation then value X.

edit: included a working example file -- @BadListener will release Captive Events compatible with this XML format.

From this version and onward I will try to be backwards  compatible, aka only add optional elements, so any XML events you write now -might- be usable directly in future versions. If not, the mod logs by itself to the folder where the XML is put an error message.

The XSD is the schema file, it describes how the XML are allowed to look like. The XML are the files you can make yourself.

The current formal allows for unlimited linking between events -even between standard existing events and your custom events. So you can write an event where one of the options triggers a prostitution event that exists.

So Event 1 can have an option that triggers Event 2 and that event can have an option that triggers Event 3.

The numbers of options in each event is also totally free and customizable.. its a list
 

<Options>
			<Option>
				<Order>0</Order>
				<MultipleRestrictedListOfConsequences>
					<RestrictedListOfConsequences>DecreaseRelation</RestrictedListOfConsequences>
					<RestrictedListOfConsequences>AttemptEscape</RestrictedListOfConsequences>
				</MultipleRestrictedListOfConsequences>
				<OptionText>You fly into a rage, trying to suprise him.. strike him down and flee from your captivity.</OptionText>
			</Option>
			<Option>
				<Order>1</Order>
				<MultipleRestrictedListOfConsequences>
					<RestrictedListOfConsequences>IncreaseRelation</RestrictedListOfConsequences>
					<RestrictedListOfConsequences>ImpregnationRisk</RestrictedListOfConsequences>
				</MultipleRestrictedListOfConsequences>
				<OptionText>You agrees. Dying a little inside when you slowly remove your clothes.</OptionText>
			</Option>
			<Option>
				<Order>2</Order>
				<MultipleRestrictedListOfConsequences>
					<RestrictedListOfConsequences>DecreaseRelation</RestrictedListOfConsequences>
				</MultipleRestrictedListOfConsequences>
				<OptionText>Crying and appologizing you deny the man.</OptionText>
				<Triggerothereventname>Test_SimpleRape</Triggerothereventname>
			</Option>
		</Options>




 

testthreeadvancedevent.xml

XSEFS.xsd

Link to comment
15 hours ago, YoungSailorGlitter said:


My XML format for creating new events, so you can write your own.

 

Have ..

 <xs:element ref="ReqHeroCaptorRelationAbove" minOccurs="0"   />
        <xs:element ref="ReqHeroCaptorRelationBelow" minOccurs="0"   />
        <xs:element ref="ReqCaptorTrait" minOccurs="0"   />

So you can write your own event, and say that 'for this event to occur Hero needs to be captive to a hero with Cruel trait' by adding
<ReqCaptorTrait>Cruel<ReqCaptorTrait/>

 

Also in the standard version your relation with your captor changes - for example if you let him fuck you.

In my XML format you can write an event that only will take place if your captor have Higher relation then value X.

edit: included a working example file -- @BadListener will release Captive Events compatible with this XML format.

From this version and onward I will try to be backwards  compatible, aka only add optional elements, so any XML events you write now -might- be usable directly in future versions. If not, the mod logs by itself to the folder where the XML is put an error message.

The XSD is the schema file, it describes how the XML are allowed to look like. The XML are the files you can make yourself.

The current formal allows for unlimited linking between events -even between standard existing events and your custom events. So you can write an event where one of the options triggers a prostitution event that exists.

So Event 1 can have an option that triggers Event 2 and that event can have an option that triggers Event 3.

The numbers of options in each event is also totally free and customizable.. its a list
 


<Options>
			<Option>
				<Order>0</Order>
				<MultipleRestrictedListOfConsequences>
					<RestrictedListOfConsequences>DecreaseRelation</RestrictedListOfConsequences>
					<RestrictedListOfConsequences>AttemptEscape</RestrictedListOfConsequences>
				</MultipleRestrictedListOfConsequences>
				<OptionText>You fly into a rage, trying to suprise him.. strike him down and flee from your captivity.</OptionText>
			</Option>
			<Option>
				<Order>1</Order>
				<MultipleRestrictedListOfConsequences>
					<RestrictedListOfConsequences>IncreaseRelation</RestrictedListOfConsequences>
					<RestrictedListOfConsequences>ImpregnationRisk</RestrictedListOfConsequences>
				</MultipleRestrictedListOfConsequences>
				<OptionText>You agrees. Dying a little inside when you slowly remove your clothes.</OptionText>
			</Option>
			<Option>
				<Order>2</Order>
				<MultipleRestrictedListOfConsequences>
					<RestrictedListOfConsequences>DecreaseRelation</RestrictedListOfConsequences>
				</MultipleRestrictedListOfConsequences>
				<OptionText>Crying and appologizing you deny the man.</OptionText>
				<Triggerothereventname>Test_SimpleRape</Triggerothereventname>
			</Option>
		</Options>




 

testthreeadvancedevent.xml 3.9 kB · 7 downloads

XSEFS.xsd 7.73 kB · 4 downloads

Thanks for helping me out in implementing the custom events in the XMLs, gotta start copying and pasting the default events from the code to the XMLs in abit before I release it.

 

Lot of work maybe I will be able to write my own erotic fanfic after. XD

Link to comment

Ok i dont know much about the .dll mod side of this  But i had a thought, yea  just the one

So this guy https://www.nexusmods.com/mountandblade2bannerlord/mods/6?tab=description

Is injecting textures into the game.

So since we cant crack the .gtex /tpac files yet.. no tools from TW

would it be possible to do the same thing for the characters ...  

Any of you brain trust able to figure out how he did it ?

I can understand the the dds files. and it would just be a fix till we get tools but maybe it could be done?

Link to comment
5 hours ago, SadSun said:

XSEFS XML is really cumbersome. Will the code not allow for it to be more simple? @YoungSailorGlitter


Short answer is no. It is a trade off between complexity and simplicity. We want a format that is can cover many different potential events and also usage of said events.   :)

But also yes.

Much of the fields are 'optional'. Meaning that you can just ignore having them in your XML. Just use the one's you need. The example contains many fields because its intended to be educational. Or something.

EDIT: I will make an XML example that is simple as possible, but still compatible with the format. Thank you @SadSun for that question. Might be available later today.

 

Some fields, like ReqHeroMinAge ex 18 and SexualContent true/false is mandatory for each event for a reason. You are allowed with this 'increase in complexity' to make events with non-sexual content also for heroes under 18.

 

For example someone said that an event they wanted to make should only happen if the party had Wine around.. how the bleep is that supposed to happen without a ReqHeroPartyHaveItem tag in the XML (and its optional)? If you do not need the complexity, just ignore those items in the format.

How to make it simple for ya


A ) Copy/paste example event from the example file I provided.

B ) Just care and edit about like five specific fields , fiddle with other things only when you feel like making it more complex.

 

Name - A unique name, like 'SadSuns_GropeEvent005'

 

Text - The initial description of whats going on

 

Option - One option entity for each option the player might have, use Order to decide in what order they show up in on the selection. OptionText is what the player will see.If you want one Option to trigger another event, use Triggerothereventname -- for example 'SadSuns_SoldEvent001'. But you do not have to. One XSEFSEvent is what most events need. Then MultipleRestrictedListOfConsequences is the coded result of what the players option if clicked, like she might get preggo if she accepts having sex.

C ) Throw it into your xml folder in your mod to test it (if you did something wrong then it will generate an error log file in the same folder)

 

Soon I might make it even simpler for ya if I get a hell yeah!


While I do not promise this, I am likely to create an VZE AMAZING PATENTED EVENT GENERATOR for ya'all.

A quick and easy step by step, either web page or application based GUI that generates XML event files. And if I do, they will be likely be able to output in format for both Captive Events and Events Extended*. 


 

----
*If @Scypio gets me a XSD
 


 

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