Jump to content


Photo

So let's say a n00b wanted to mod...


  • Please log in to reply
42 replies to this topic

#21 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 03 January 2013 - 04:54 PM

Good use of the forums and people's time!

I'll have to bit you the same, for miss quoting me and failing to read the of my whole post... like the word "small" in it.
PS: I'll do the same for Choo Choo too... just to insert one more snide remark.

3. is it possible/healthy that such an NPC would comment on events such as: ...
b) after a modded NPC joins the party for the first time
c) comment randomly on a given party member to the PC?

the B & C can also be done in other means by the way.... like say as additional content in the Crossmod Banter Pack... which is exactly where this sort of thing belongs(if not in the mod itself) ... that is if you don't like to check if the mod x, y, z and D3000 was installed while the D3001f is totally out of the question.

This seems reasonable because the inter-party banters should use same counters/variables, no? Maybe I'm wrong. I'm green, after all

Well, the variable's causing lag -concept is an old one and it's likely one colored with various stuff, you are far more likely to cause lag by other means (the 25++ means). So just forget about that and constraint to the fact that they won't cause your items to be checked every nano second and so forth. So the talk checks are intelligent.


Deactivated account. The user today is known as The Imp.


#22 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9200 posts

Posted 03 January 2013 - 05:00 PM

We don't do interjections in the CBP anymore because they're very difficult to do, just so everyone is aware.



#23 Echo

Echo
  • Member
  • 125 posts

Posted 03 January 2013 - 05:06 PM

Good use of the forums and people's time!

I'll have to bit you the same, for miss quoting me and failing to read the of my whole post... like the word "small" in it.
PS: I'll do the same for Choo Choo too... just to insert one more snide remark.

3. is it possible/healthy that such an NPC would comment on events such as: ...
b) after a modded NPC joins the party for the first time
c) comment randomly on a given party member to the PC?

the B & C can also be done in other means by the way.... like say as additional content in the Crossmod Banter Pack... which is exactly where this sort of thing belongs(if not in the mod itself) ... that is if you don't like to check if the mod x, y, z and D3000 was installed while the D3001f is totally out of the question.

This seems reasonable because the inter-party banters should use same counters/variables, no? Maybe I'm wrong. I'm green, after all

Well, the variable's causing lag -concept is an old one and it's likely one colored with various stuff, you are far more likely to cause lag by other means (the 25++ means). So just forget about that and constraint to the fact that they won't cause your items to be checked every nano second and so forth. So the talk checks are intelligent.

 

 

I know that talking items mods are a no-no for multimod installs, so it wouldn't even cross my mind to have one :) As for other 24++ means, I'd assume they pertain more to quest mods and new areas and stuff, no? What I've planned is just talk based with a quest that will use existing areas. Having played through almost all of the small mods [no NEJ etc], there's a fair chance I know which room or floor where is unoccupied by any other mod, should I ever need to place something somewhere.


avatar592049_2.gif


#24 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 03 January 2013 - 05:23 PM

As for other 24++ means, I'd assume they pertain more to quest mods and new areas and stuff, no?
Well, the 25++ refers to this list, and the fact that you should have the TobEx v24 or later... ouh, why people miss quote... you know you can actually remove things that the person says in their posts, right ?
We don't do interjections in the CBP anymore because they're very difficult to do, just so everyone is aware.
But shouldn't that be the whole point of the mod.... make a good and conjoined mod content.

Edited by Jarno Mikkola, 03 January 2013 - 05:26 PM.

Deactivated account. The user today is known as The Imp.


#25 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9200 posts

Posted 03 January 2013 - 05:45 PM

Best of luck trying it yourself--if you can get it working correctly and in a way that is compatible with everything, let me know. :) We chose not to, because it's difficult and can potentially create compatibility issues. CBP is meant to be compatible with everything, and we'd rather sacrifice interjections for general compatibility and the knowledge that it will always work.



#26 Echo

Echo
  • Member
  • 125 posts

Posted 06 January 2013 - 06:26 AM

I have a question related to the engine, if I may: can something deal damage that is a percentage of character's maximum/remaining health? Through a dialogue, not a skill.


avatar592049_2.gif


#27 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 06 January 2013 - 07:17 AM

I have a question related to the engine, if I may: can something deal damage that is a percentage of character's maximum/remaining health? Through a dialogue, not a skill.
Well, it can be done, it won't be easy and it won't actually use percentile figures...

As the thought here is to set a variable during the dialog based on the targets HP's, then when the dialog is over, the mod.cre's override script checks which the variable is and orders the target to take that amount of damage.

Deactivated account. The user today is known as The Imp.


#28 Echo

Echo
  • Member
  • 125 posts

Posted 06 January 2013 - 02:49 PM

Alright, thanks. I will not touch this concept for now.

 

So I've done what the tutorial linked above said, but aside of the fact that nothing works at all, I have a few concrete questions about it, but I don't want to necro the thread there so maybe someone can help me here.

 

1. What are all these files/file sections here:

 

// Add this to the end

APPEND ~pdialog.2da~
~K#John K#JohnP K#JohnJ K#JohnD K#Joh25P K#Joh25J K#Joh25D K#John25~
UNLESS ~K#John~

APPEND ~interdia.2da~
~K#John K#JohnB K#JohB25~
UNLESS ~K#John~

 

2. I had a problem following this step, it didn't let me. What is this about?

 

10) Scroll down until you get to Override Script: type in K#John (or whatever your npc's filename is)


Edited by Echo, 06 January 2013 - 02:52 PM.

avatar592049_2.gif


#29 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 06 January 2013 - 03:59 PM

1. What are all these files/file sections here:
 APPEND ~pdialog.2da~
~K#John K#JohnP K#JohnJ K#JohnD K#Joh25P K#Joh25J K#Joh25D K#John25~
UNLESS ~K#John~

APPEND ~interdia.2da~
~K#John K#JohnB K#JohB25~
UNLESS ~K#John~
Well, those are the ******.d file names of the files you are going to use to add to the games own dialogs... the further down instructions will tell what each of them contain, when they are eventually created... so you don't need to worry about going back when you do them eventually.
 
2. I had a problem following this step, it didn't let me. What is this about?
10) Scroll down until you get to Override Script: type in K#John (or whatever your npc's filename is)
Well, using the NearInfinity or other types of file editors, you edit the .cre file ... there's not really much that can be said about this... Erhm, were you in the "Edit" tab ? As the "View" tab is not intractable ... and you might need to right click and push "Edit as string" ... it depends on what version of NearInfinity you have.

Deactivated account. The user today is known as The Imp.


#30 Echo

Echo
  • Member
  • 125 posts

Posted 06 January 2013 - 04:14 PM

Of course I was in the edit tab. But yes, using edit as string seemed to do the trick. Thanks.

 

 

Hm, I don't see anywhere in the tutorial or following posts anything about what these respective dialogue files should contain.

 

"one for the intro. dialogue, parting dialogue, one for banters, and one for interjections."

 

That gives 3 in total.

 

The file lists 8. And I'm confused about the fact that from what I got from the tutorial file K#John also includes the K#JohnP part. For intro and departure. So in effect I've no idea about the rest of them.


Edited by Echo, 06 January 2013 - 06:19 PM.

avatar592049_2.gif


#31 Solaufein

Solaufein

    No fate but what we make

  • Modder
  • 263 posts

Posted 06 January 2013 - 10:44 PM

K#John is the first greeting most likely. Like hey can I join you?

 

K#JohnP is for kicking out and rejoining. Hey you kicked me out, I'll go wait over there. Or Oh you came back, want me to rejoin? 


Her lips were red, her looks were free
Her locks were as yellow as gold
Her skin was white as leprosy.
The Nightmare Life-in-Death was she,
Who thicks man's blood with cold.

Samuel Taylor Coleridge

http://teambg.net
The Undying
 

#32 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 06 January 2013 - 11:24 PM

And the K#joh25...'s are for the ToB part of the game. Not that there's actual difference on how you use the things... well it might be easier if you do it way, and the naming logic is inside the tutorial.

Deactivated account. The user today is known as The Imp.


#33 Echo

Echo
  • Member
  • 125 posts

Posted 10 January 2013 - 07:07 AM

I've got a quick question regarding PIDs. Example situation:

 

NPC: What?

1. nice weather, eh?

2. i like bugs

(...)

 

Now, if I want NPC to respond to option 2 saying either "i like bugs too" or "here's a bug for you" or "you have a bug on your head". I've heard that I need to do this:

 

NPC: What?

1. nice weather, eh?

2. [condition random] i like bugs

3. [condition random] i like bugs

4. [condition random] i like bugs

(...)

 

Then follow up with NPC responses the way I did before. Or is there some way to condition NPC's responses?


avatar592049_2.gif


#34 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 10 January 2013 - 11:55 AM

Then follow up with NPC responses the way I did before. Or is there some way to condition NPC's responses?
Well, the NPCs response is coded in the GOTO *** or the + section of the CHAIN:
BEGIN IJ#esirA

CHAIN
IF ~(additional conditions and check that the NPC "IJ#esirA" is in the party etc )~ THEN IJ#esirA first-PC-talk
~What?~
DO ~SetGLOBAL("***","GLOBAL",1)~
++ THEN REPLY ~nice weather, eh?~ + Esiriak-PC-1
+[condition random]+ THEN REPLY ~ i like bugs~ + response-PC-2
+[condition random]+ THEN REPLY ~ i like bugs~ + response-PC-3
+[condition random]+ THEN REPLY ~ i like bugs~ + response-PC-2
END

CHAIN
IF ~~ THEN IJ#esirA Esiriak-PC-1
~...~
++ THEN REPLY ~...~ + response-PC-2 EXIT
END
Yes, there's a lot of new code in that...

Deactivated account. The user today is known as The Imp.


#35 Echo

Echo
  • Member
  • 125 posts

Posted 10 January 2013 - 11:59 AM

I meant if there is a way around giving 3 times the same PC response: giving one and then directing it to a block with 3 various NPC responses picked at random/conditioned by something.


avatar592049_2.gif


#36 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 10 January 2013 - 12:08 PM

I meant if there is a way around giving 3 times the same PC response: giving one and then directing it to a block with 3 various NPC responses picked at random/conditioned by something.
+[condition random]+ THEN REPLY ~ i like bugs~ + response-PC-2
+[condition random]+ THEN REPLY ~ i like bugs~ + response-PC-3
+[condition random]+ THEN REPLY ~ i like bugs~ + response-PC-2 
:D Those three conditions/dialog options takes the dialog to just two actual responses ... and if you check the first reply(not shown) also ends up in the "response-PC-2" dialog.

Edited by Jarno Mikkola, 10 January 2013 - 12:19 PM.

Deactivated account. The user today is known as The Imp.


#37 Echo

Echo
  • Member
  • 125 posts

Posted 10 January 2013 - 12:14 PM

I understand what you paste here, but I don't think you understood what I'm asking about :P

 

I ask if there is a way to make it closer to something like:

 

 

NPC: What?

+ nice weather, eh?  + response 1
+ i like bugs        + response 2

 

NPC response 2
~ random reply 1
~ random reply 2 
~ random reply 3

 

The reason I'm asking for this is because when there's a PID, for example a flirt bunch, that looks something like:

 

 

NPC: What?

 

- option 1

- option 2

- option 3

- option 4

- option 5

- option 6

- option 7

- option 8

- option 9

 

 

And if I wanted to each option to have say 5 random replies from the NPC then instead of 9 lines I end up with 45 of them, don't I? While there's only 9 different lines.

And then there's 45 blocks they direct to, instead of 9 and each with 5 different replies.


avatar592049_2.gif


#38 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 10 January 2013 - 12:40 PM

Jarno is right... and wrong.

 

He's right about the way random transitions are handled. If you want one "static" transition, where you will always get the same response when you click on it, it's just 

++ ~Nice weather, eh?~ EXTERN ##MyNPCJ state1

 

When you want a choice of 3 random responses, it becomes

+ ~RandomNum(3,1)~ + ~I like bugs.~ EXTERN ##MyNPCJ state2a

+ ~RandomNum(3,2)~ + ~I like bugs.~ EXTERN ##MyNPCJ state2b

+ ~RandomNum(3,3)~ + ~I like bugs.~ EXTERN ##MyNPCJ state2c

 

Jarno is wrong about where he puts the END while using CHAIN.

 

So, your hypothetical state0 would be

 

CHAIN

IF ~conditions~  ##MyNPCJ state0

~What?~

DO ~SetGlobal("whatever","GLOBAL",1)~ 

END

++ ~Nice weather, eh?~ EXTERN ##MyNPCJ state1

 

+ ~RandomNum(3,1)~ + ~I like bugs.~ EXTERN ##MyNPCJ state2a

+ ~RandomNum(3,2)~ + ~I like bugs.~ EXTERN ##MyNPCJ state2b

+ ~RandomNum(3,3)~ + ~I like bugs.~ EXTERN ##MyNPCJ state2c

 

etc

 

Note that the END comes before the transitions.

 

Keep in mind that the "dice" are only rolled once for each random number type, so if you have three sets of 3 random responses, if you get #2 for one, you'll get #2 for all. If you have one set of 4 random responses, one set of 3 random responses, and one set of 5 random responses, they will all be different.


"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#39 Echo

Echo
  • Member
  • 125 posts

Posted 10 January 2013 - 03:34 PM

A shame that it seems it really needs this doubling, tripling or quantupling of responses, but I guess I'll have to live with it if that's the only way for it to go.

 

I'll have to get the whole external banter files things, but I won't get into all of that now because I see it's one thing after another so I'll stick to writing now and worry about moving things to proper places later.

 

But thanks, it answers my question so I'll go ahead and multiply the responses in preparation I guess.


avatar592049_2.gif


#40 Nocturne

Nocturne
  • Member
  • 87 posts

Posted 21 February 2013 - 12:29 AM

If you need a writer for the dialogue, I *might* be interesting depending on how much time I have currently and if 'twill be an interesting story. :) Send me a PM with your ideas if you want help and I'll have a looksee. :)