Jump to content

Zed Nocear's Trigger-Simulations for BG1


Recommended Posts

To the triggers of Z!EmulAreaCheck.BAF and Z!EmulAreaCheck1.BAF I must add trigger "ActionListEmpty()", because they are appended at the bottom of every area-scripts and, if executed, this blocs could break an action from prior activated blocs of area-scripts.

Link to comment

Since I'm in the middle of updating BG1 Tweaks, this is good information to have. Z!EmulAreaCheck1.BAF, Z!EmulAreaCheck.BAF and the .tp2 have been updated. "Send BioWare NPC's to an Inn" still remains BETA, since I'm still looking for feedback on how it works (or doesn't), and it is the only tweak using your code.

 

Thanks for the hard work.

 

(Now if I can only get those "bags" of holding to work properly...)

Link to comment

(But for now there is no component with "bags of holding" in BG1 Tweaks, is there any?)

 

(True bags of holding are impossible in BG1, if someone doesn't make a 5th type of shop in BG1 engine. I make some substitute solution in my own mod TWM, this part of mod has even english translation, but 80% of whole mod doesn't:

Download site: http://wrota.cob.netarteria.pl/dwdl

Direct link: http://wrota.cob.netarteria.pl/download/mo...mo3(v29,58).exe

 

These "bags of holding" work properly, they allow to store high numbers of items and don't allow earn money :) , but they have many other disadvantages, because of engine limitation:

a/ containers have the interface of a shop,with buy and sell buttons

b/ "unsellable" items cannot be put in the container.

c/ You cannot see how many of the same items are in the container. You must remove them individually one by one, which may be annoying when it is group of items, like arrows or many of the same potions.

d/ The game engine does not see items within the container as being in possession of the party.

e/ Before selling items in shop we must take them out from the container.

f/ "Bags of holding" always have unlimited stack of items, engine doesn't consider a limit of items in STO file.)

Link to comment
(But for now there is no component with "bags of holding" in BG1 Tweaks, is there any?)

 

(True bags of holding are impossible in BG1, if someone doesn't make a 5th type of shop in BG1 engine. I make some substitute solution in my own mod TWM, this part of mod has even english translation, but 80% of whole mod doesn't:

Download site: http://wrota.cob.netarteria.pl/dwdl

Direct link: http://wrota.cob.netarteria.pl/download/mo...mo3(v29,58).exe

 

These "bags of holding" work properly, they allow to store high numbers of items and don't allow earn money :) , but they have many other disadvantages, because of engine limitation:

a/ containers have the interface of a shop,with buy and sell buttons

b/ "unsellable" items cannot be put in the container.

c/ You cannot see how many of the same items are in the container. You must remove them individually one by one, which may be annoying when it is group of items, like arrows or many of the same potions.

d/ The game engine does not see items within the container as being in possession of the party.

e/ Before selling items in shop we must take them out from the container.

f/ "Bags of holding" always have unlimited stack of items, engine doesn't consider a limit of items in STO file.)

Portable Containers is a new tweak I'm working on. Thanks for the links, I'll check out your version since Tioma's and CoM's Dark Side versions leave me with problems. If yours works, I'll ask permission to include it. As for the limitations, I've noticed the same with CoM's version and expect the same with Tioma's.

 

Edit: (03-18) I've a working tweak now, though it needs testing. All "stores" open with TotSC installed, crash without (either from .bam problems or program rejection). I can tag it TotSC only, but I'd like to also tag it to skip if TWM is installed. My version will have only the five basic containers. Questions - Is there an area file specific to TWM I can use as the skip tag? Are there limits to how many times they can be opened? How much will they hold?

Link to comment

TWM is not well known in the world, but one for the most popular (after NTotSC) mods for BG1 in Poland. It is still in development and current version has "demo" status. I plan large new locations for the nearest future, but for now TWM has some new areas for special random encounters by travelling the map, e.g. AR6044.ARE.

 

Because TWM is not know worldwide, I didn't add tags for components yet, but I can make it very quickly in the next update. TWM is also ONLY for BG1+TotSC, therefore I didn't have your problem.

 

I'm afraid, tag in BG1 Tweaks, that causes skipping code for "bags of holding" if TWM is installed, doesn't solve the problem of compatibility between TWM and BG1 Tweaks definitely. TWM has also some tweak components, which modify every file of specified type (e.g. CRE or AREi) and more tweaks, which double the content of BG1 Tweaks (I have made them bevor first BG1 Tweaks were published). Therefore I recommend to install TWM as the last. Recently I have added to TWM the code that lets skip the doubling content with BG1 Tweaks, IF (!) TWM is installed last. Because the component in TWM with "bags of holding" is more expanded, with some special magic type of items of this art, which are associated with dialogs and quests, I wouldn't like skip my whole component, if "bags of holding" from BG1 Tweaks are installed.

 

Maybe it's too late for this proposal, but I had an idea, that I cut out from TWM the code with basic type of bags of holding, you can modify all what you dislike or find buggy, and next the same code will be placed to both mods. Of course solution from TWM and BG1 Tweaks could work fully separately, but if "bags" in BG1 has infinity capacity, one exemplar of any type is enough for party. It's meaningless to put more "bags" of the same type.

 

I don't know how many efford do you allready spend for this component, but maybe you will agree for my proposal? My solution of "bags of holding" I made not at once, but it remains some month of thinking and tests, until the solution was enough good for me.

Link to comment

I'm of the school that believes tweaks should come last. That means they are subordinate to quest/NPC mods. Yours is the greater work, even if it is unknown beyond the borders of Poland. Let me know which components conflict with TWM, and I will flag them in the tp2 to skip if it's installed. I just need a component flag from your mod. BG2 Tweaks has several components flagged this way. If your core components create a file (like the G3 tweak packs do), I can use that file as the marker.

 

I helped in your English translations, so I have a rough idea of what to expect.

 

As for my Portable Containers component, yours will include a couple of nice items that I will skip. The bookcase and cloaks really belong in a full mod like yours. If nothing else, including it in BG1 Tweaks will give your work a platform for testing (it will be flagged BETA).

 

Edit: (03-20) I've checked out your method. I was a bit confused at first by the apparent money gains. Then I closed the store. Nice work-around to the Dark Side problem. And I'll take your previous post as permission to use your Bags (z!bag01, 02, 03, 04 and 11) in the next version of BG1 Tweaks (proper attribution given, of course, and not in the same locations as yours).

 

Edit: (03-22) I have included your codes in BG1 Tweaks v2. I have noted in the component readme to skip this component if your mod is installed as it will cause duplicates to appear. I still believe TWM should be installed before BG1 Tweaks. All components of BG1 Tweaks install separately, and I have added a comment in the Overview section that care should be taken with my mod, especially when other mods such as yours have similar components, and to skip those BG1 Tweak components that will conflict with the other mod. This should work until you have a better level of completion of your work, and have added tags to your components.

 

Until then, good modding. :)

Link to comment
And I'll take your previous post as permission...

 

I,m not happy that you ask me for permission when you have almost finished the work and I don't have any influence on details of this component. It's not fair. I don't want any strike with you, and what should I do in this situation?

 

I give you permission, to use my solution in BG1 Tweaks, but if you copy a part of my mod to BG1 Tweaks, I expect that you make me at least as a co-author of this component. I would like to see the code of this component before publication, maybe I could propose some changes, not important for you and not visible for players, but important for me. I will discuss some important issues yet later.

Link to comment
I,m not happy that you ask me for permission when you have almost finished the work and I don't have any influence on details of this component. It's not fair. I don't want any strike with you, and what should I do in this situation?

 

I give you permission, to use my solution in BG1 Tweaks, but if you copy a part of my mod to BG1 Tweaks, I expect that you make me at least as a co-author of this component. I would like to see the code of this component before publication, maybe I could propose some changes, not important for you and not visible for players, but important for me. I will discuss some important issues yet later.

Thank you for your permission. Do not worry. Your concerns and input are important to me. I have not uploaded it yet. I am currently checking the component out, as well as Send Bio-Ware NPC's to an Inn (which uses your revised area check codes), so it will be a while yet before I ask the admins to host it.

 

Yours is the first Bags tweak I've found that works properly for me. That is why I included it. You are the author and you (and TWM) are given credit at every point - in the index, overview, component description and thanks/acknowledgments. I have also noted that it is not to be installed with TWM. I take no credit. As my tag says, I'm a "Blithering Idiot and BG1 Tweaks Scavenger," nothing more. I am more than willing, and quite happy, to let you review what I have done.

 

Do you wish me to pm or e-mail you the code, or post it here?

 

Edit: (03-24) And I apologize for any misunderstanding. I have re-read your previous posts and make no excuse. I was overzealous with adapting your work and it clouded my judgment. Your input is more important now than ever, and I want no bad feelings between us over this.

Link to comment

I'm very happy for your standpoint and future cooperation. If I have had bad suspicions, this is while you wrote nothing, what could dispel my doubts. Now it's OK.

 

I dont' know structure of G3 forum very well, but I suggest, that we should create a new topic for "bags of holding in BG1 Tweaks and related issues" in more proper place, and shift the latest posts (from #33) to this topic, if you have the rights to make this.

 

You know also my email address. It can get attachments up to 100MB. I will write my proposals for "bags", when I see your work.

 

You persuaded me, that TWM should be installed before BG1 Tweaks. I didn't correct it for now, but in the next readme-file I will recommend to install TWM after other mods except BG1 Tweaks. that should go last. However, I don't get a message, that TWM installed after BG1 Tweaks have corrupted something. Therefore I want keep the possibility, that if someone install TWM after BG1 Tweaks, it makes no incompatibility with "bags" component. I have fast prepared an published a new version of TWM (demo 3.1), which contain tag-files (and 28 other fixes): http://wrota.cob.netarteria.pl/download/mo...3,1(v29,87).exe

The list of conflicts, if BG1 Tweaks is installed after TWM:

*/ BG1TWEAKS: Change Experience Point Cap and TWM component @54: tag-file TWM-54lvl50.CoB

*/ BG1TWEAKS: Higher HP on Level Up and TWM component @55: tag-file TWM-55maxHP.CoB

*/ BG1TWEAKS : Shut Up "You Must Gather Your Party ..." and TWM component @56: tag-file TWM-56ShutUp.CoB

*/ BG1TWEAKS : Wear Multiple Protection Items and TWM component @98: tag-files TWM-980ItmEXCL.CoB TWM-981ItmEXCL.CoB

 

TWM has also other typical tweak-components, but I don't know, if they can make any incompatibility with BG1 Tweaks components, maybe you find any incompatibility or suggest conflict with BG1 Tweaks componnets:

@63 ~Accelerated banters in BG1~

@90 ~Separated portrait sets for NPC's and for main character v1,5~

@91 ~Experience for Disarming Traps and Lockpicking v3.5~

@92 ~Experience for learning new spells v2.1~

@93 ~For hardcore players: alternative experience's table above 15. level~

@94 ~For hardcore players: limited respawn of creatures - less hack & slash in BG1~

@95 ~For hardcore players: Less experience for killing enemies~

 

By the way one hint to "Send Bio-Ware NPC's to an Inn": Its better to use combination of Face+MoveGlobal, instead of LeaveAreaLUA for joinable NPCs. By LeaveAreaLUA the destinate area is loaded with ugly load-screen, and Face+MoveGlobal works silent. First Face, then MoveGlobal, because in MoveGlobal you couldn't set the orientation of creature and after execution of MoveGlobal you lost the control on creature. I have tested this solution in TWM and recommend it, e.g.:

instead LeaveAreaLUA("AR2301","",[778.754],12)

better Face(12) MoveGlobal("AR2301","NPCScriptName",[778.754])

Link to comment

I have sent you the Portable Container codes by e-mail. I also included the relevant parts of the README file. I will tag my components as you have indicated. As for the other components you have listed, I have nothing related in BG1 Tweaks and so I do not see any incompatibilities. Of course that does not mean something won't show up later by someone using this component of yours and that component of mine. Such is the unpredictability and risk of modding that we have both taken.

 

I will try out your code adjustment for Send Bio-Ware NPC's to an Inn, but it will be a while. I don't want to mess up the installation I'm running now. It would be nice to get rid of the black load screen as the NPC's leave the area...

 

I do not think it necessary to start a new topic now. Let us continue the Containers discussion by email and return this topic to its proper focus - your emulation codes. Many thanks for your hard work.

 

Edit: I have added checks for your tag files. One last tag is needed - for the Portable Containers tweak. What is it?

Link to comment

In TWM "bags of holding" are a part of main component and the tag-file is TWM-01CORE.CoB.

 

If I watch your email, I write answer soon.

 

EDIT: One quick comment to your email:

I have found one problem. I play in multi-player mode to allow me to start with a decent bard to help identify things. As long as a player-created NPC was in the party I had a problem when I closed the container. It would remove the "store operation gold," then reopen. When I closed it the second time the party gold was restored ... plus 1000gp. This happened every time I opened the bag, but only if I had the player-created NPC in the party. That NPC is currently at the FAI and I have had no problems with any of the three containers I currently have.

I suppose, I understand the bug. The main script-blocks, that manage behavior of portable containers (Dplayer3_bagsAD.BAF), are placed in dplayer3.bcs. In multi-player mode more then one party member has dplayer3.bcs and all scripts are activated parallel. Therefore "bag" is opened more then one. Try this solution:

1/Add block on the top of Dplayer3_bagsAD.BAF:

IF
 Global("Z!WhichPartyMember","LOCALS",0)
THEN
 RESPONSE #100
ActionOverride(Player1,SetGlobal("Z!WhichPartyMember","LOCALS",1))
ActionOverride(Player2,SetGlobal("Z!WhichPartyMember","LOCALS",2))
ActionOverride(Player3,SetGlobal("Z!WhichPartyMember","LOCALS",3))
ActionOverride(Player4,SetGlobal("Z!WhichPartyMember","LOCALS",4))
ActionOverride(Player5,SetGlobal("Z!WhichPartyMember","LOCALS",5))
ActionOverride(Player6,SetGlobal("Z!WhichPartyMember","LOCALS",6))
END

2/ Add trigger Global("Z!WhichPartyMember","LOCALS",1) to every other block of Dplayer3_bagsAD.BAF.

For example:

IF
 Global("Z!WhichPartyMember","LOCALS",0)
THEN
 RESPONSE #100
ActionOverride(Player1,SetGlobal("Z!WhichPartyMember","LOCALS",1))
ActionOverride(Player2,SetGlobal("Z!WhichPartyMember","LOCALS",2))
ActionOverride(Player3,SetGlobal("Z!WhichPartyMember","LOCALS",3))
ActionOverride(Player4,SetGlobal("Z!WhichPartyMember","LOCALS",4))
ActionOverride(Player5,SetGlobal("Z!WhichPartyMember","LOCALS",5))
ActionOverride(Player6,SetGlobal("Z!WhichPartyMember","LOCALS",6))
END

IF
 Global("Z!WhichPartyMember","LOCALS",1)
Global("bagus01","LOCALS",1)
THEN
RESPONSE #100
	SetGlobal("bagus01","LOCALS",0)
	CreateCreature("Z!BAG01",[0.0],1)
	CreateCreature("Z!BAG0X",[0.0],1)
END

IF
 Global("Z!WhichPartyMember","LOCALS",1)
Global("bagus02","LOCALS",1)
THEN
RESPONSE #100
	SetGlobal("bagus02","LOCALS",0)
	CreateCreature("Z!BAG02",[0.0],1)
	CreateCreature("Z!BAG0X",[0.0],1)
END

IF
 Global("Z!WhichPartyMember","LOCALS",1)
Global("bagus03","LOCALS",1)
THEN
RESPONSE #100
	SetGlobal("bagus03","LOCALS",0)
	CreateCreature("Z!BAG03",[0.0],1)
	CreateCreature("Z!BAG0X",[0.0],1)
END

IF
 Global("Z!WhichPartyMember","LOCALS",1)
Global("bagus04","LOCALS",1)
THEN
RESPONSE #100
	SetGlobal("bagus04","LOCALS",0)
	CreateCreature("Z!BAG04",[0.0],1)
	CreateCreature("Z!BAG0X",[0.0],1)
END

IF
 Global("Z!WhichPartyMember","LOCALS",1)
Global("bagus11","LOCALS",1)
THEN
RESPONSE #100
	SetGlobal("bagus11","LOCALS",0)
	CreateCreature("Z!BAG11",[0.0],1)
	CreateCreature("Z!BAG0X",[0.0],1)
END

 

Now only dplayer3.bcs of Player1 should handle the portable containers behavior.

 

EDIT2: I have tested this solution in TWM and it works. Thanks for the bug report.

Link to comment

I finally updated the tutorial with the new suggestions. Please let me know if you spot any errors.

 

The changes are for the Party Rested Check, the Combat Counter Simulation and the AreaCheck Emulation. Every BG1 mod using these simulations should be updated accordingly to maintain compatibility.

Link to comment

Corrected the party rested dialogue trigger. The trigger variable should be greater than 1 for the first dialogue:

GlobalGT("X#AjantisRomanceRestCounter","GLOBAL",1) //greater as 1: the first time the variable is incremented is directly after the installation!
Link to comment

Doing a new component for BG1 Tweaks, I ran into a problem that stopped some creatures from spawning. After Zed Nocear looked into it he gave me two recommendations, which I now pass on for z!emulareacheck.baf:

 

IF
Delay(2) // was 1
ActionListEmpty()
THEN
RESPONSE #100
	SetGlobal("Z!EmulAreaCheck","GLOBAL",Variable_Number)
	SetGlobal("Z!EmulAreaType","GLOBAL",Variable_Flags)
	SetGlobal("Z!EmulAreaOutdoor","GLOBAL",Variable_Outdoor)
	SetGlobal("Z!EmulAreaCity","GLOBAL",Variable_City)
	SetGlobal("Z!EmulAreaForest","GLOBAL",Variable_Forest)
	SetGlobal("Z!EmulAreaDungeon","GLOBAL",Variable_Dungeon)
	SetGlobalTimer("Z!EmulAreaNotMaster","GLOBAL",4) // was 4
END

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...