VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Development Content Development
  • Search

(Possibly) Simplified World Building Concepts

VGOEmulator content development topics.

Moderators: Moldew, Jakkal

Post Reply
Advanced search
27 posts
  • Previous
  • 1
  • 2
  • 3
  • Next
User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Jakkal » Tue Jan 12, 2016 2:43 pm

Can we get a list of variables (is that the right word?) for things like "putcharactersnamehere" or "putNPCsnamehere?" I'm trying to make this generic Tursh guard script, and his name is hardcoded in : StartConversation(conversation, 'Guard Winston says, "What are you looking for?"')
I tried " .. GetName(Npc) .. " and " .. GetName(NPC) .. " but I guess they aren't the right things.

Edit: I found this but it's the same thing I tried. Xinux is looking into it now for me. http://eq2emulator.net/wiki/index.php/LUA:GetName
Image
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Tue Jan 12, 2016 4:08 pm

Yeah the first round of Lua Functions were kinda thrown together before the full Lua system was available.

GetName(any-damn-thing) should work, for everything and anyone. We should not need a separate GetNpcName() which is what I suspect is coming
Top

User avatar
Xinux
Project Leader
Project Leader
Posts: 2549
Joined: Wed Aug 28, 2013 2:20 pm
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Xinux » Tue Jan 12, 2016 4:19 pm

We have it it's GetTarget(Npc) just like it is in EQ2.
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Tue Jan 12, 2016 5:04 pm

GetTarget returns an NPCs name who you are hailing? That's not intuitive. GetName kinda is.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Jakkal » Tue Jan 12, 2016 7:24 pm

So I'm looking at the Fawns in Tursh, who used to follow the Doe's in front of them. Do we have a function for that yet? I saw this on the EQ one, but not in our lua list, so I assume we don't have it yet: http://eq2emulator.net/wiki/index.php/L ... llowTarget

I was messing around with it a bit, but couldn't figure out how to get it to follow the specific doe in front if it.

I might be wrong about the fawns.
Image
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Tue Jan 12, 2016 7:37 pm

Nope, barely any EQ2 functions are in our code (see above excuse), except of course the low hanging fruit Xinux was able to knock out the first week

Add your requested functions in this thread, and one of us will try getting to it asap. Meanwhile, anything more than basic movement or Hail is likely beyond the scope of week-1 scripting. Just keep a list because a lot of functionality will be needed.


fwiw, I began looking into this because of the sets of guards that patrol the zones, and clusters of NPCs (gnolls in Halgarad) so I'm certain you are correct.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Jakkal » Tue Jan 12, 2016 7:52 pm

Okay, another stupid question™!

I've got an NPC here: Farmhand Lightwater, who has 5 dialogue options. The example only shows how to do 2. How do we set him up so he goes through his whole dialogue options?

I've already set up the dialogue functions (Greeting, Greeting1, Greeting2, etc). I just don't know how to get him to say anything other than the first two.

I very obviously want to get this done, you might have underestimated my eagerness to get this game back up and running >.>

Edit: For my own notes for when I know how to do this: Add Farmer Bryce to the list of more than 2 dialogue responses.
Image
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Wed Jan 13, 2016 6:42 am

If you read the text carefully, you can see Lightwater actually only has 2 dialogs; the others are incorrectly added by the Generator (that thing I mentioned I have to fix)

[quote]--[[ raw_dialog_headers
ID: 17571, Text: Gobon says, "We haven't seen any pumpkin horrors yet on this road, but that's not to say we'll never see them.", Log: 422

ID: 19466, Text: Lightwater says, "Rindol Field couldn't be a worse place right now. I'm glad the humans hired me to work their fields.", Log: 437

ID: 34594, Text: Gobon says, "Good, an adventurer."\n\n\n\n"Maybe with you around, I won't get attacked by any redcaps.", Log: 718

ID: 47878, Text: Loggin says, "I've heard wild tales about the gnomes. They live in a faraway city called Mek-Qalia, and use glowing crystals instead of fire.", Log: 1128

ID: 84057, Text: Lightwater says, "We dalefolk have always helped the humans farm their fields." Under his breath, he adds, "They can't really farm on their own, anyway.", Log: 2127

ID: 84063, Text: Redstalk says, "I remember sixty years ago, when the orcs and goblins burnt Tursh to the ground. The fields rebounded afterwards, and we had some of our best harvests.", Log: 2127
--]][/quote]
So in short, you still only need a math.random(0,1)

But for future reference, math.random is merely low, high. So if you have 5 dialogs to random, it's math.random(0,4) because 0 counts as the 1st one, etc.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Jakkal » Wed Jan 13, 2016 9:09 am

Okay, but for future reference, I tried this on Lightwater's script with all the entries:

Code: Select all

function hailed(Npc, Player)
	FaceTarget(Npc, Player)
	if math.random(0, 4) == 0 then
	    Greeting(Npc, Player)
	else
	    Greeting1(Npc, Player)
	end
end
It's the two "Greeting(Npc, Player)" and "Greeting1(Npc, Player)" thing that I'm wondering about. Let's say, for example's sake, he does have 4 randomly generated things to say. How do I add in "Greeting2(Npc, Player)? Would it look like...

Code: Select all

function hailed(Npc, Player)
	FaceTarget(Npc, Player)
	if math.random(0, 4) == 0 then
	    Greeting(Npc, Player)
	else
	    Greeting1(Npc, Player)
	else
	    Greeting2(Npc, Player)
	else
	    Greeting3(Npc, Player)
	end
end
From what very little I know of coding, that doesn't make any sense. Cuz I realize it's saying, "If it's 0, say this first one, otherwise, say the second one." But I don't know how to tell it to say the others
Image
Top

User avatar
Xinux
Project Leader
Project Leader
Posts: 2549
Joined: Wed Aug 28, 2013 2:20 pm
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Xinux » Wed Jan 13, 2016 9:43 am

You would do something like this.

Code: Select all

    choice = math.random(0,2)
    
    -- Variable response
    if choice == 0 then
        StartConversation(conversation, "I do not believe I have seen you around before. What brings you here?")
    elseif choice == 1 then
        StartConversation(conversation, "I do not believe I have seen you around before. What brings you here?")
    elseif choice == 2 then
        StartConversation(conversation, "I do not believe I have seen you around before. What brings you here?")
    else
        StartConversation(conversation, "If you are here to take some fish for yourself, you will regret that in short order!")
    end
Top


Post Reply

27 posts
  • Previous
  • 1
  • 2
  • 3
  • Next

Return to “Content Development”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Development
  • ↳   Content Development
  • ↳   Thestra Adventuring
  • ↳   Qalia Adventuring
  • ↳   Kojan Adventuring
  • ↳   Crafting/Harvesting
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD