Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Instance Manager (https://forums.graalonline.com/forums/showthread.php?t=134263240)

Devil_Lord2 06-17-2012 03:28 AM

Quote:

Originally Posted by DustyPorViva (Post 1697453)
That is NOT what teachers do. Sorry.

@.@;; Okay, fine, teachers do not teach... Some are born with calculus and others aren't...

Quote:

Originally Posted by ffcmike (Post 1697454)
David_K, no offence but people do not want to read your life story. It can actually be more effective to be short and straight to the point than to write a short story every paragraph.

Yeah you are right, I've heard once when you argue with a fool, onlookers won't know the difference. No point in justifying a statement if there is no will to analyze it. One can only hope?

Anyway, once again, tonight is my last night, so I wanted to try and get this out of the way for Shaded Legends. In doing so I may have gotten it out of the way permanently. Not my intent, but you can't miss something you've never had.

As for the life story thing.. ;D
Another day..

xXziroXx 06-17-2012 03:44 AM

Quote:

Originally Posted by Devil_Lord2 (Post 1697462)
@.@;; Okay, fine, teachers do not teach... Some are born with calculus and others aren't... [/SIZE]

Studying to become a teacher myself, one of the more common things we've been told is that we're not supposed to teach, we're supposed to help our students to learn on their own.

DustyPorViva 06-17-2012 03:49 AM

Quote:

Originally Posted by Devil_Lord2 (Post 1697462)
@.@;; Okay, fine, teachers do not teach... Some are born with calculus and others aren't...

Teachers don't just sit down and teach a kid Calculus. The fact that you're not even grasping this is a little worrying.

Devil_Lord2 06-17-2012 03:49 AM

Quote:

Originally Posted by xXziroXx (Post 1697463)
Studying to become a teacher myself, one of the more common things we've been told is that we're not supposed to teach, we're supposed to help our students to learn on their own.

Because I like philosophy, I'm going to message you to discuss that further since it is off topic.

Quote:

Originally Posted by DustyPorViva (Post 1697464)
Teachers don't just sit down and teach a kid Calculus. The fact that you're not even grasping this is a little worrying.

Since you never mentioned the word trying, or factored in any amount of time given, or other information, I can't say there 'should' be much to talk about further... The only problem is I can... And it is hard not to. If you want, I can message you what a tutor, the willpower to learn, and even books can do...

ff7chocoboknight 06-17-2012 03:59 AM

Quote:

Originally Posted by ff7chocoboknight (Post 1697422)
How does one become as obnoxious as you are?

Quote:

Originally Posted by Devil_Lord2 (Post 1697443)
taking into account I only used the Graal Forums search engine, and it did not show, nor show in the code gallery, I do find rude, unnecessary. The fact that I mentioned it also, was due to my ignorance and and lack of awareness that this was a year old, and it seems like almost everything is now hidden.

Quote #1 don't forget to bold something mash the keyboard until your hand hurts slap on a band-aid and let's bold this part too

just gonna toss in the definition of a word now

aph·ro·dis·i·ac:
A food, drink, or drug that stimulates sexual desire.
A thing that causes excitement.

yup

Quote:

Originally Posted by Devil_Lord2 (Post 1697443)
I don't know much about the NPC section and why flags, attributes, and script shows three different things. Nor why the script randomly disappeared after it was set, and turned into flags.



I will have to disagree with this one, because this is what teachers do. The other person could learn i

Quote#2 it's random.
There was this one time that I bolding this part here fell down the stairs. It was painful. That's kind of how I feel when you post. booooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooold Never forget to bold randomly. ever

Quote:

Originally Posted by Devil_Lord2 (Post 1697443)
gramming as well as C programming in college. Visual Basics in high school. I've been doing GS1 since 2003 and started GS2 in I guess 2010. My math is very rusty but I've taken up to trigonometry... twice sadly.

So giving steps to follow, usually called a tutorial, should help in implementing such a system as this, since I believe the objective of the code gallery is to use them if it would help progress the server. Learning is only addit

Learning is hard. Especially when you can only think in large paragraphs and always feel the need to explain yourself (just like Bayne). :U wuuuuuuuuuut


random video

Quote:

Originally Posted by Devil_Lord2 (Post 1697443)
Conclusion:
From what I see, obviously if many people feel that he has tried to explain it, and my persuasion and justifications aren't enlightening anyone. Perhaps everyone is right. Maybe this program should not be given to the average Graal community, and it should perhaps be said so, as I once mentioned before.

Conclusion
"Most people in this room are playing their cards, Lex Veldhuis is playing poker"


every post needs at least two videos

Why does that quote fit in here? It doesn't, but nobody is going to read my post just like nobody reads your posts.

Quote:

Originally Posted by ff7chocoboknight (Post 1697422)
How does one become as obnoxious as you are?


Devil_Lord2 06-17-2012 04:14 AM

Quote:

Originally Posted by ff7chocoboknight (Post 1697466)
Quote #1 don't forget to bold something mash the keyboard until your hand hurts slap on a band-aid and let's bold this part too

just gonna toss in the definition of a word now

aph·ro·dis·i·ac:
A food, drink, or drug that stimulates sexual desire.
A thing that causes excitement.

yup


Quote#2 it's random.
There was this one time that I bolding this part here fell down the stairs. It was painful. That's kind of how I feel when you post. booooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooold Never forget to bold randomly. ever



Learning is hard. Especially when you can only think in large paragraphs and always feel the need to explain yourself (just like Bayne). :U wuuuuuuuuuut


random video



Conclusion
"Most people in this room are playing their cards, Lex Veldhuis is playing poker"


every post needs at least two videos

Why does that quote fit in here? It doesn't, but nobody is going to read my post just like nobody reads your posts.

Ahh.. sorry, I read your post. :X
I suppose all the statements are void... My bad.. @.@;;
Also, bold words can be used to assert statements or ideas, or even ease reading for others. It can also be used to give topic heads, so those who want to skip to the important parts can. You might learn this is technical writing which is very interesting. In case you wanted to know. :noob:

Also, I think you should advertise my work more, we could make a good team.

ff7chocoboknight 06-17-2012 04:18 AM

Quote:

Originally Posted by Devil_Lord2 (Post 1697470)
Also, I think you should advertise my work more, we could make a good team.

I picked that video because it's one of the more laughable ones.

Devil_Lord2 06-17-2012 04:49 AM

Quote:

Originally Posted by ff7chocoboknight (Post 1697473)
I picked that video because it's one of the more laughable ones.

I thought you liked cows... :\
You've brought the topic way off topic,
I'm going to stop posting in it.

Also was not my intent..
Don't take my cow. ;)

ff7chocoboknight 06-17-2012 11:49 AM

I grew up in a farm. I hated barnyard animals.

cbk1994 06-17-2012 12:04 PM

I'm honestly not sure how much easier I can make this. More verbose perhaps?
  1. As the OP says, give the NPC-server proper rights to the folder where you'll store your levels and the folder where your template levels are stored.

    http://uploads.graalcenter.org/uploa...51.06%20AM.png
  2. Upload the scripts in the archive attached to the OP, making these changes to the script InstanceManager before hitting "apply":
    • Change the temp path
    • Change the unstick path
    Note: Since it is a SCRIPT, the code for the InstanceManager goes into the NPC's SCRIPT.

    http://uploads.graalcenter.org/uploa...54.51%20AM.png
  3. Create your instance class (e.g. "quest_instance") from the code in the OP, adjusting it for your situation.

    http://uploads.graalcenter.org/uploa...01.07%20AM.png
  4. Add your instance type to the script of the InstanceManager, using the commented-out easter map instance type as an example (as stated in OP).

    http://uploads.graalcenter.org/uploa...58.02%20AM.png
  5. Copy the code in the OP for creating a new instance, adapt it into your code. For example, a door that warps players to a new quest instance:

    http://uploads.graalcenter.org/uploa...01.52%20AM.png

Congratulations, you're now using instances.

http://uploads.graalcenter.org/uploa...03.43%20AM.png
http://uploads.graalcenter.org/uploa...04.00%20AM.png

ff7chocoboknight 06-17-2012 12:08 PM

Ol' West :D

Devil_Lord2 06-17-2012 09:55 PM

Thank you for taking your time to provide steps, I'll send this to Cujo.

smirt362 06-17-2012 11:45 PM

Pretty cool, I wonder if you could do a randomized dungeon sort of thing with it where you have premade level pieces that get stitched together in a random order.

Stephen 06-17-2012 11:51 PM

Quote:

Originally Posted by smirt362 (Post 1697546)
Pretty cool, I wonder if you could do a randomized dungeon sort of thing with it where you have premade level pieces that get stitched together in a random order.

Googi would be all over that.

xXziroXx 06-18-2012 01:39 AM

Quote:

Originally Posted by smirt362 (Post 1697546)
Pretty cool, I wonder if you could do a randomized dungeon sort of thing with it where you have premade level pieces that get stitched together in a random order.

Maloria has a system like that.

Crono 06-18-2012 03:43 PM

Quote:

Originally Posted by smirt362 (Post 1697546)
Pretty cool, I wonder if you could do a randomized dungeon sort of thing with it where you have premade level pieces that get stitched together in a random order.

FP4 did that and posted it up here. :]

I think it requires this one to be included somewhere, somehow, someplace.

Draenin 01-13-2013 06:40 AM

I am having issues with only one thing so far, and that's the Instance Manager NPC you specified earlier. It doesn't seem to be recognizing the emergency exit commands and whatnot, and I'm not entirely sure what to do about it. RC kicks back the following errors:

Quote:

Originally Posted by RC
Script: Function unknown_object.waitForSetup not found at line 29 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
Script: Function unknown_object.setInstanceID not found at line 31 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
Script: Function unknown_object.setTempPath not found at line 8 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))
Script: Function unknown_object.setEmergencyExit not found at line 9 in script of InstanceManager (in level onlinestartlocal.nw at pos (30.5, 30))

And here's what I have entered currently:

PHP Code:

function onInitialized() {
  
this.trigger("created");
}

function 
onCreated() {
  
// basic setup
  
GameInstance newInstanceTemplate("TStaticVar");
  
GameInstance.setTempPath("levels/temp/"); // folder which holds resources
  
GameInstance.setEmergencyExit("main_av-24.nw"3030);
  
  
/*
  // Easter Maps
  EasterMapInstance = newInstanceTemplate("GameInstance");
  
  // you can specify temp folders or exits for each instance,
  // like this:
  EasterMapInstance.setTempPath("levels/eastermaps/");
  
  EasterMapInstance.join("easter2k11_instance_map");*/
}

function 
newInstanceTemplate(parent) {
  
temp.instance = new (@ parent)();
  
  if (! (
"instance" in instance.joinedclasses)) {
    
instance.join("instance");
  }
  
  
instance.waitForSetup();
  
  
instance.setInstanceID("invalid");
  
instance.setup false;
  return 
instance;
}

public function 
registerInstance(instance) {
  
this.instance.(@ instance.getInstanceID()) = instance;
}

public function 
getInstance(id) {
  return 
this.instance.(@ id);



I haven't changed level names or anything yet. It's a fresh install, but I'll be changing them later. Anyway, what would the fix for this be? Everything else seems to be working fine so far. Great work, man. :D

cbk1994 01-13-2013 07:00 AM

My guess would be that the instance class isn't being joined to the object. Does it exist, and does it contain the right script? Do those functions work if you join it to some random NPC?

Draenin 01-13-2013 07:16 AM

Quote:

Originally Posted by cbk1994 (Post 1712061)
My guess would be that the instance class isn't being joined to the object. Does it exist, and does it contain the right script? Do those functions work if you join it to some random NPC?

Well, I should explain what I've done so far:

1. Unzipped the files, copy-pasted the scripts in the zip file's 'class' folder to two classes. (instance_main, instance_level)
2. Copy-pasted the script in the zip file's 'npcs' folder to the InstanceManager NPC and added stuff from your first post.
3. Created a third class called instance_control from stuff in your first post.


Haven't attempted to post the first bit of code you posted that creates the instance, but when I copy-paste the code from the InstanceManager text in the zip file into the NPC, I get those errors. The other things seem to be fine.

Is this how it's supposed to be set up? I tried joining a level NPC to the code in each one of those three classes I made, but it still doesn't fix the problem which seems to be coming from the NPC instead.

cbk1994 01-13-2013 08:15 AM

Quote:

Originally Posted by Draenin (Post 1712062)
Well, I should explain what I've done so far:

1. Unzipped the files, copy-pasted the scripts in the zip file's 'class' folder to two classes. (instance_main, instance_level)
2. Copy-pasted the script in the zip file's 'npcs' folder to the InstanceManager NPC and added stuff from your first post.
3. Created a third class called instance_control from stuff in your first post.


Haven't attempted to post the first bit of code you posted that creates the instance, but when I copy-paste the code from the InstanceManager text in the zip file into the NPC, I get those errors. The other things seem to be fine.

Is this how it's supposed to be set up? I tried joining a level NPC to the code in each one of those three classes I made, but it still doesn't fix the problem which seems to be coming from the NPC instead.

"instance_main" probably needs to be just "instance" (just guessing from your naming what you did, but there should be an "instance" class). It's the base instance, not an actual usable instance, so "instance_main" doesn't really make sense. The NPC expects the class to be named just "instance" which is the root of your trouble.

I wrote out these instructions later on (in case you didn't see them):

Quote:

Originally Posted by cbk1994 (Post 1697509)
  1. As the OP says, give the NPC-server proper rights to the folder where you'll store your levels and the folder where your template levels are stored.

    http://uploads.graalcenter.org/uploa...51.06%20AM.png
  2. Upload the scripts in the archive attached to the OP, making these changes to the script InstanceManager before hitting "apply":
    • Change the temp path
    • Change the unstick path
    Note: Since it is a SCRIPT, the code for the InstanceManager goes into the NPC's SCRIPT.

    http://uploads.graalcenter.org/uploa...54.51%20AM.png
  3. Create your instance class (e.g. "quest_instance") from the code in the OP, adjusting it for your situation.

    http://uploads.graalcenter.org/uploa...01.07%20AM.png
  4. Add your instance type to the script of the InstanceManager, using the commented-out easter map instance type as an example (as stated in OP).

    http://uploads.graalcenter.org/uploa...58.02%20AM.png
  5. Copy the code in the OP for creating a new instance, adapt it into your code. For example, a door that warps players to a new quest instance:

    http://uploads.graalcenter.org/uploa...01.52%20AM.png

Congratulations, you're now using instances.

http://uploads.graalcenter.org/uploa...03.43%20AM.png
http://uploads.graalcenter.org/uploa...04.00%20AM.png


Draenin 01-13-2013 09:28 AM

On step 2 of what you quoted, RC still gives me the same errors. My NPC server has all the rights it needs. Also, I get errors from the one I was instructed to put in the level. I changed everything I needed to change, and it's still the same errors.

Not trying to fuss or anything. Just telling you what RC is telling me.

cbk1994 01-13-2013 08:00 PM

Quote:

Originally Posted by Draenin (Post 1712072)
On step 2 of what you quoted, RC still gives me the same errors. My NPC server has all the rights it needs. Also, I get errors from the one I was instructed to put in the level. I changed everything I needed to change, and it's still the same errors.

Not trying to fuss or anything. Just telling you what RC is telling me.

And you have the instance classes uploaded properly, and everything else is named as it should be (in the archive in OP)? It doesn't really expect you to rename stuff. If you do, you'll need to adjust references to whatever you've renamed.


All times are GMT +2. The time now is 08:39 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.