Jump to content


Invisible creature


7 replies to this topic

#1 -Old Friend-

  • Guest

Posted 07 March 2010 - 08:10 AM

(Sorry for bed spelling)

Hello! Can I ask for some help?

Invisible creature must appear near character when item is equiped and create/add item to summoner inventory. I tried to do it via equiped effect of item, but if inventory is full, new item drops to the ground. I NEED to prevent this, item MUST stay in inventory. So, i set variable to weapon (when equiped), and created creature w/o animation... that's all :(
I don't know how to spown this creature. Some lines must be added to baldur.bcs
IF
  Global("a_pack","Locals",1)
THEN
  RESPONSE #100
    (tell me how to give item to summoner)
    DestroySelf()
END

Thanks for help

#2 Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10180 posts

Posted 07 March 2010 - 09:26 AM

This is fast tutorial, just replace the 'aaaaaaaa' with what ever you wish.

View PostOld Friend, on 07 March 2010 - 08:10 AM, said:

...
Make a new .txt file and rename it as aaaaaaaa.baf and put it to a folder called aaaaaaaa, then put the following code into it ans save, using this:
IF
  Global("a_pack","Locals",1)
THEN
  RESPONSE #100
    GiveItemCreate(S:StrRef*,O:Object*,I:Usage1,I:Usage2,I:Usage3)
    SetGlobal("a_pack","Locals",2)
    DestroySelf()
END
Where the S:StrRef* is the item files name without the .itm
The O:Object* is
LastSummonerOf(Myself)

And the I:Usage1-3 are numbers of charges, etc. the items extended headers have.

View PostOld Friend, on 07 March 2010 - 08:10 AM, said:

Some lines must be added to baldur.bcs
It's far better to add this line to the .cre's individual script... which is easy to do with WeiDU.exe mod...
The setup-aaaaaaaa.tp2 part is this kind(for aaaaaaaa.cre that's stored in the mods own folder called aaaaaaaa of all things):
BACKUP ~aaaaaaaa/backup~
AUTHOR ~Your name, Contact at (where?)~

BEGIN ~aaaa mods component name~ 

COMPILE ~aaaaaaaa/aaaaaaaa.baf~
COPY ~aaaaaaaa/aaaaaaaa.cre~ ~override/aaaaaaaa.cre~
     WRITE_ACII 0x0248 ~aaaaaaaaaa~
The you just copy a possible setup-*modname*.exe that's already in the game directory and rename it as setup-aaaaaaaaa.exe and start it... it will give you the possibility to install the "aaaa mods component name" component.

Edited by Jarno Mikkola, 07 March 2010 - 10:04 AM.

Cerberus v1.05, MegaModKits v1.01L, iiSpellSystemAdjustments v7.1; mods by Jarno Mikkola the Imp. FAQ for the Megamods. The Frequently Answered Questions.
Posted Image

Markaan Raneshark said:

I am afraid of nothing.
PS: I am probably still editing the post above.
PPS: Even though I am a cruel person, I'll never post direct downloading links to you, without warning, unless you'll already see the download counter.

View PostDarpaek, on 26 January 2010 - 09:58 PM, said:

BWS - Standard = not imba. Tactical = stupid hard. Expert = broke.
In case the BG2 game crashes, open up the 'baldur.ini' in your game folder, and under the [Program Options] section in the file, make a new line and type in 'Logging On=1' (without the '' quotes, unless the line is already there)... Save the file and exit. Now go back into the game and try to reproduce the crash. Then look in your game folder again for the Baldur.err file and open it with the Notepad to analyze its contents, or let us do it.

View PostMiloch, on 07 July 2010 - 07:06 PM, said:

Always post the contents of your baldur.err in the case of crashes. I seem to be repeating this like 5 times every time I log on here :P.

#3 -Old Friend-

  • Guest

Posted 07 March 2010 - 04:13 PM

Thank you for help!
BUT
I did it all and still don't understand, how this creature will spawn, when item is equiped.

#4 GeN1e

    A very GAR character

  • Modder
  • 1316 posts

Posted 07 March 2010 - 08:46 PM

There's no need to summon anything, you can give it directly.

IF
HasItemEquiped("yourITM",Player1)
Global("whatever_check_you_need","global",1) // you can use 'locals' only in individual scripts
THEN
RESPONSE #100
ActionOverride(Player1,GiveItemCreate("newITM",Myself,1,0,0)
SetGlobal("whatever_check_you_need","global",2)
END

Repeat for Player2-6.

Edited by GeN1e, 07 March 2010 - 08:46 PM.

"Uguu~ Boku Ayu."

#5 -Old Friend-

  • Guest

Posted 08 March 2010 - 12:54 AM

OK, but someone tells me that additional lines in baldur.bcs cause stuttering bug. It's better to add just one check, to spawn creature, and rest include in it's script or i'm wrong?

Thank You!

#6 Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10180 posts

Posted 08 March 2010 - 01:55 AM

It all depend totally what you wish the item to do, and in what circomstances... but I'll despice you if you extend the baldur.bcs with your code, as there is no need for it.

View PostOld Friend, on 07 March 2010 - 04:13 PM, said:

I did it all and still don't understand, how this creature will spawn, when item is equiped.
There is no such condition in your list of options... unless you wuish to extend the baldur.bcs ... but I would recomend you not to do such a stupid thing. Now tell us what exactly you wish the item to do, or simulate of doing.

View PostGeN1e, on 07 March 2010 - 08:46 PM, said:

There's no need to summon anything, you can give it directly.

IF
HasItemEquiped("yourITM",Player1)
Global("whatever_check_you_need","global",1) // you can use 'locals' only in individual scripts
THEN
RESPONSE #100
ActionOverride(Player1,GiveItemCreate("newITM",Myself,1,0,0)
SetGlobal("whatever_check_you_need","global",2)
END

Repeat for Player2-6.
Yes, that would work in the baldur.bcs, perhaps if it wasn't busy of doing 10 000 different things at the same time, which will all cause a bit of slack, and slow the whole game to a growl.

View PostOld Friend, on 08 March 2010 - 12:54 AM, said:

OK, but someone tells me that additional lines in baldur.bcs cause stuttering bug. It's better to add just one check, to spawn creature, and rest include in it's script or i'm wrong?
It's better to actually make a fine item that has abitity that summons the creature that that acts the script and then gets destroyed one time, and one time only.
Cerberus v1.05, MegaModKits v1.01L, iiSpellSystemAdjustments v7.1; mods by Jarno Mikkola the Imp. FAQ for the Megamods. The Frequently Answered Questions.
Posted Image

Markaan Raneshark said:

I am afraid of nothing.
PS: I am probably still editing the post above.
PPS: Even though I am a cruel person, I'll never post direct downloading links to you, without warning, unless you'll already see the download counter.

View PostDarpaek, on 26 January 2010 - 09:58 PM, said:

BWS - Standard = not imba. Tactical = stupid hard. Expert = broke.
In case the BG2 game crashes, open up the 'baldur.ini' in your game folder, and under the [Program Options] section in the file, make a new line and type in 'Logging On=1' (without the '' quotes, unless the line is already there)... Save the file and exit. Now go back into the game and try to reproduce the crash. Then look in your game folder again for the Baldur.err file and open it with the Notepad to analyze its contents, or let us do it.

View PostMiloch, on 07 July 2010 - 07:06 PM, said:

Always post the contents of your baldur.err in the case of crashes. I seem to be repeating this like 5 times every time I log on here :P.

#7 -oLD fRIEND-

  • Guest

Posted 08 March 2010 - 02:56 AM

(sorry for be spelling)

What i want to do? - BackPack (рюкзак). W/o it your inventory 'll be limited to only few slots. It's silly that "naked" looking character can have 10+ heavy armors in his pocket.

How it 'll work? - I planning additional ingame animation for bag, so it used shield slot. I've done a code, that give every character with biography some (10-12) unmovable empty items w/o icons, that make these slots unaccessible. When bag is equiped these items are eliminated, and you have your original slots.

What's my problem? - I can't make this empty items back to inventory, when bag is unequiped. I tried to make a bag unmovable after equiping, and give ability to set it off, including creation of empty items as part of ability. But in this case empty items will fall to the ground and slots stay accessible :(

#8 -Old Friend-

  • Guest

Posted 08 March 2010 - 04:14 AM

Seems to work now!




Reply to this topic