Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Apr 2015
G
gamer08 Offline OP
stranger
OP Offline
stranger
G
Joined: Apr 2015
Hello guys, I am working on a mod tha depend on the Main and I wonder something.

Is it possible to call a procedure defined in another files ?

E.G Let's says I want call ImprisonPlayer((CHARACTER)_Player,(STRING)_Prison) defined in Prison from one of my Goals (MyMod_Quest1). Is it possible ?

Actually everything, I did to call from other files fail so...

Do I need to redefined the procedures I need in my own mod ?


In the same way, if I try to insert something in a DB (InRegion for example) in one of my goals (MyMod_Quest1), does it insert in the same InRegion use somewhere else or he will create a new DB InRegion for my mod ?

I am open to every solutions

Thanks guys

Last edited by gamer08; 16/04/15 07:13 PM. Reason: Change subject
Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
If the procedure you are talking about is in MAIN then you will need to add that MAIN goal file to your mod. Then you will likely have to fix some errors since it will be looking for objects not in your mod.

You could try and surgically paste in the procedure you want but I usually go for the method described above. Or just rewrite it.


Last edited by SniperHF; 16/04/15 07:33 PM.
Joined: Apr 2015
G
gamer08 Offline OP
stranger
OP Offline
stranger
G
Joined: Apr 2015
Thanks, I'll test it right away and give you a feedback.


gamer08

Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
Modules are self contained; mods that do not extend the Main module are unable to use any goals from Main. If another module has code you want in your own mod, you can just copy/paste the code into your own module.

That being said, story goals have access to any procedure (and DBs) defined in any of the other goals within the same mod.

Joined: Apr 2015
G
gamer08 Offline OP
stranger
OP Offline
stranger
G
Joined: Apr 2015
Ok interesting but if my mod depends on the Main am I suppose to be able to call functions defined in Main files? If yes it doesn't work at all. Try to call proc defined elsewhere and nothing.

Maybe i did something wrong, don't know.

Thanks if you can help.

gamer08

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
No, you can't call them if they aren't defined in your own goal files. That is how it normally works.

Joined: Apr 2015
G
gamer08 Offline OP
stranger
OP Offline
stranger
G
Joined: Apr 2015
Thanks for all your answers, Solved many questions.

Thanks again

gamer08


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5