Jump to content


Photo

Two coding issues


  • Please log in to reply
14 replies to this topic

#1 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 08 October 2003 - 11:06 PM

Hope someone can help me here.
First problem, we (TGM and I) wanted to add another kit to our upcoming mod. Well, maybe for the 2nd release. Anayway, I needed to create a mage kit, but it doesn't work. Of course I had to add preventively a file named K_M_H.2DA, so that WeiDU could update it. In fact it does, but still, the kit doesn't show in game.
My suspects are on specialists, they don't seem to be coded as normal kits, and things are messed up.
So, is there actually a way to create a mage kit?

Second problem: I was creating a spell, and I needed the invisible creature trick (it runs a script then disappears). Everything works right, but I'm unable to disable the "summoning smoke". It seems hardcoded with the summoning effect. I've tried to add a DisableAnimation effect, but still nothing. Maybe I need to set some unknown values?
Other possibilities? For example, are there creatures that don't "smoke" when summoned?
Thanx for any suggestions :)

Ever forward, my darling wind...


#2 Echon

Echon

    Planewanker

  • Member
  • 284 posts

Posted 09 October 2003 - 12:02 AM

For your second problem:

http://tutorials.tea...pentut&tutID=54

-Echon

#3 T.G.Maestro

T.G.Maestro

    Eclipse

  • Member
  • 4415 posts

Posted 09 October 2003 - 12:08 AM

Maybe the problem is the number of mage kits. If I remember correctly, there can be only 8 different kits added in a class.
Posted Image

Refinements v2 has been released!
Go and visit the website or the forum for more info!

Member of The Silver Star team.

#4 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 09 October 2003 - 01:53 AM

T,
You are spot on with that assessment. The last mage slot was taken up by the Wild Mage slot.

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#5 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 09 October 2003 - 09:08 AM

One work around for the inability to add to mage 'kits' is to either script a kit simulation, or to create a bard kit, then modify the bejezus outta it. (If your kit additions are mostly at the initial phase, then you can even script a class change after the game starts.)

The great wolf Fenrir gapes ever at the dwelling of the gods.


#6 Azrii

Azrii

    Iltha Windspear

  • Member
  • 65 posts

Posted 09 October 2003 - 01:39 PM

possible solution: see note at bottom
01. Delete cache/data files (just in case)
02. Add kit using ~~ (not ~K_M_H~ at kittable point)
03. Start game then exit after autosave
04. With NI open up SAVE folder
05. open up BALDUR.GAM (autosave game folder)
06. View
07. Played Characters (*IMOEN10)
07. View/edit
08. Edit
09. CRE (at bottom)
10. View/edit
11.  KIT
      a. FIND your kit
      b. UPDATE
12. Do rest of your creature edits
     (portraits, dlg, bcs, no flags set, etc)
13. Exit out with save
14. call up autosave game with SK
15. convert Imoen to cre file
16. final edit of cre and export to your mod folder with NI

I did this to make Nalia a non-playable (by protagonist) thief kit I made.
No way to test with mage kit since I don't have any new ones to add.
CRE should reflect new kit but as to if it will 'behave' properly I don't know,
hlidskialf might, he's very knowledgeable.
Hope this works! ;)

P.S. Though if you want to make kit available to protagonist, not just Mod NPC, disregard per posts above. :(
Minister of disinformation
Iltha Windspear
Working on Iltha Windspear Expansion. At left is Iltha, not me! I'm a guy. Who's Azrii you ask? She's the one who taught me it's a lot easier to fly with a basic storyline in hand as opposed to relying on my 'intuitive and ingenious' imagination.

#7 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 11 October 2003 - 12:22 AM

Thanx for the info, @all!
actually I needed the invisibility trick twice, so, two problems solved! :)

About the kit, unfortunately it should be available to the protagonist...
@hlidskialf, what do you mean by simulating it by script?

Ever forward, my darling wind...


#8 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 11 October 2003 - 08:18 PM

You can set a script on a .cre which does a level check and either applies spells or gives abilities exactly as a clab file does. So basically anything you can do with a kit you can do with a script and a helluva lot more besides. However, NPCs and the PC have certain script slots already in use, and overwriting them is BAD. (Yes, not just bad, but BAD.) I had done this at one point for the deceased Dark Awakenings mod. I had scripted up all the BG2 kits. They worked, but took a LOT of work to make. Especially due to the spell/script limitations of the BG1 engine. Thanks to BGTuTu and BGT this is no longer necassary to play a Monk from BG1 onwards. ;)

The great wolf Fenrir gapes ever at the dwelling of the gods.


#9 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 13 October 2003 - 12:17 AM

Interesting enough, setting animation to "none" in NI doesn't override the default value (I already tried that in fact), but using EFFmaker works...

Another question for you expert guys: suppose I create a creature via script. Is it possible to script even some visual effects over it? I mean, direct to a VVC or something?

@hlidskialf:
Thanx! I admit I'm scared just at the idea :P
But the kit wouldn't still appear at game creation, you can only use it on a CRE, right?

Ever forward, my darling wind...


#10 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 13 October 2003 - 04:03 AM

VVC's are only used to loop animations such as firewalls and their ilk. A normal animation, subject to it being within a certain frame count can be played with no VVC at all.

You'll need either a BAM or PRO file for some serious animations.

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#11 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 13 October 2003 - 11:38 PM

This is the only action that would seem fitting:
CreateVisualEffectObject(S:DialogFile*,O:Target*)

but how is it used?
DialogFile?
Not a bam or something?
I'd have to cast it to a newly created creature (created by a script in its turn activated by a spell... trust me there's a reason :lol: )

Ever forward, my darling wind...


#12 -Sim-

-Sim-
  • Guest

Posted 14 October 2003 - 06:48 AM

"DialogFile" is an error in the IDS. That parameter should refer to a VVC.

#13 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 14 October 2003 - 11:59 PM

Thanx Sim!
I'll have a try with that, then.

Ever forward, my darling wind...


#14 Alan M.C.

Alan M.C.

    What I can have a title?

  • Member
  • 327 posts

Posted 15 October 2003 - 01:17 PM

To create an object (creature) in a script:

CreateCreatureObjectOffset("MyCre",Player1,[0.120])

To add a special ability from a script:

AddSpecialAbility("SPELLNAME")

To avoid the BAD coding mentioned by Hlidskialf on the main player or existing NPC you can use EXTEND_TOP on Dplayer1.bcs or the NPC override BCS. Not something really recommended but quite convenient to add a few new spells quicly without resorting to creating an entire new KIT.

So to add let say an additional quivering palm as from level 18 on the main character if he is a monk, you'd EXTEND_TOP the following script to Dplayer1.bcs

IF
LevelGT(Myself,17)
Class(Myself,MONK)
Global("AddQuiv","LOCALS",0)
THEN
RESPONSE #100
SetGLobal("AddQuiv","LOCALS",1)
DisplayString(Myself,'New ability gained: quivering palm')
AddSpecialAbility("QUIVERING_PALM")
END

Alan M.C.

#15 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 16 October 2003 - 11:48 PM

Thanx Alan!
The work on the second Kit is on hold though, given the problems, till we complete the primary component of the mod.
And I'd really need to make it a mage kit, as it'd be intended to be a playable class...

Ever forward, my darling wind...