User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 26

Thread: Custom Guys

  1. #11
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,430
    Level
    24
    vBActivity - Bars
    Lv. Percent
    69.57%
    Well. This has generated a lot more discussion than I would have thought.

    I'm really not sure how hard this would be. Thing is, guys are actually enemies. You ever notice that enemy IDs start at 20? The guys are 1-10. So, most likely, you'd create new guys in the enemy editor. That much is fairly easy to do.
    Here's where it gets difficult: the code was written with the assumptions that guys and other enemies could be distinguished by their IDs and that guys' IDs would never be greater than 255. Neither of those would be true anymore, and I don't know how hard it would be to deal with that. It can certainly be done, but it's not trivial.

  2. #12
    Octorok Binx's Avatar
    Join Date
    Feb 2006
    Age
    36
    Posts
    157
    Mentioned
    9 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,220
    Level
    11
    vBActivity - Bars
    Lv. Percent
    95.41%
    The argument about how we should "learn scripting" is a BS one, anyways, because maybe some of us LIKE using the built-in room types. I personally can't stand the shop script, and I LIKE being able to use the built in rooms. But, that means that i don't get to have multiple races in my games, because I can't even edit the damned COLORS of the guys. I mean, if guys are just enemies, why can't the engine assign any enemy to the "guy" spot?

    EDIT: And for the record, no, 10 slots isn't enough when you CAN'T EDIT THEM. If I could do things like tell it to make Abei 2 use a different tile and CSet, I would. I personally really don't understand why two of the guys are EXACTLY THE SAME. One of those slots is Zelda, so you can't do anything there, you need the Empty, Fire and Fairy Guys, so that leaves 5 slots (Abei, Ama, Moblin, Merchant and Goriya) Tell me again how we have more than enough guys?
    Last edited by Binx; 08-14-2013 at 03:39 PM.
    Please check out my current project, The Legend of Zelda: Trials of the Gods
    http://armageddongames.net/showthrea...ls-of-the-Gods
    Current release: V3.1 (Demo)

  3. #13
    Admiral Zim's Avatar
    Join Date
    Oct 2012
    Posts
    388
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    1,699
    Level
    13
    vBActivity - Bars
    Lv. Percent
    82.73%
    Quote Originally Posted by lineas View Post
    The argument about how we should "learn scripting" is a BS one, anyways, because maybe some of us LIKE using the built-in room types. I personally can't stand the shop script, and I LIKE being able to use the built in rooms. But, that means that i don't get to have multiple races in my games, because I can't even edit the damned COLORS of the guys. I mean, if guys are just enemies, why can't the engine assign any enemy to the "guy" spot?

    EDIT: And for the record, no, 10 slots isn't enough when you CAN'T EDIT THEM. If I could do things like tell it to make Abei 2 use a different tile and CSet, I would. I personally really don't understand why two of the guys are EXACTLY THE SAME. One of those slots is Zelda, so you can't do anything there, you need the Empty, Fire and Fairy Guys, so that leaves 5 slots (Abei, Ama, Moblin, Merchant and Goriya) Tell me again how we have more than enough guys?
    I wasn't arguing. I was merely stating that one message script and one item script would solve this for you.. It's just as much effort on your part to use 1 or 2 ffc scripts and enjoy all the freedoms they would bring to your game, and they're already done.

    I already knew (at one point) that guys were NPC, in fact, summon NPC scripts can spawn "guys."
    The only difference here is that.... wait a minute..
    Why not just make a blank guy (no graphic) and use an invincible NPC? At that point you'd just have to fix it's coordinates (script).

  4. #14
    Cor Blimey! CJC's Avatar
    Join Date
    Dec 2002
    Location
    Fading into the darkness
    Age
    35
    Posts
    1,398
    Mentioned
    150 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,618
    Level
    25
    vBActivity - Bars
    Lv. Percent
    0.96%
    Quote Originally Posted by Saffith View Post
    Well. This has generated a lot more discussion than I would have thought.

    I'm really not sure how hard this would be. Thing is, guys are actually enemies. You ever notice that enemy IDs start at 20? The guys are 1-10. So, most likely, you'd create new guys in the enemy editor. That much is fairly easy to do.
    Here's where it gets difficult: the code was written with the assumptions that guys and other enemies could be distinguished by their IDs and that guys' IDs would never be greater than 255. Neither of those would be true anymore, and I don't know how hard it would be to deal with that. It can certainly be done, but it's not trivial.
    I figured that guys were actually enemies because so many of the rules surrounding them is to make them NOT seem like enemies. Would it be easier to remove the 'guy' distinction completely and just advise players to use Walkers with no animation and insurmountable defenses, combined with an enemy placement flag?
    ...But that wouldn't work with strings and their fireball retaliation, would it? Or with caves for that matter. Ugh, this really is a knot made out of snakes, isn't it?


    EDIT: Successor explained in chat that my suggested workaround is fundamentally no different than the current 'use none and a guy-looking combo' alternative. So I guess it's back to the drawing board.
    Spoiler: show
    In the meantime, to get around this hold in the program, I recommend that players use the Empty guy in dungeon screens and place an enemy spawn flag roughly at the center of the room. Use one of the empty enemy slots to create a walker with no animation or step rate, and presto! Improvised custom guy, no scripting necessary. You can even set the walker to not count as a beatable enemy so that--on the off chance you're one of those mean quest makers who puts enemies in string rooms--you can still trigger secrets. This can even trigger fireball retaliation... provided you place the enemy flag in the exact center of the screen (where the invisible 'none' guy sits) and set its defenses to Ignore. The only thing this can't achieve is an altered guy in an overworld cave.
    Last edited by CJC; 08-14-2013 at 09:50 PM.

  5. #15
    Wizrobe Nightmare's Avatar
    Join Date
    Mar 2000
    Age
    44
    Posts
    2,523
    Mentioned
    40 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    3,840
    Level
    19
    vBActivity - Bars
    Lv. Percent
    75.69%
    Quote Originally Posted by Zim View Post
    I wasn't arguing. I was merely stating that one message script and one item script would solve this for you.. It's just as much effort on your part to use 1 or 2 ffc scripts and enjoy all the freedoms they would bring to your game, and they're already done.

    I already knew (at one point) that guys were NPC, in fact, summon NPC scripts can spawn "guys."
    The only difference here is that.... wait a minute..
    Why not just make a blank guy (no graphic) and use an invincible NPC? At that point you'd just have to fix it's coordinates (script).
    And someone mind putting up basic scripts or a tutorial on how to use them? I know it's C-based thank god, but I don't know which is which with the terminology.

    -James

    Facebook: http://www.facebook.com/nightmarejames YouTube: http://www.youtube.com/nightmarejames

    Game Projects
    Zelda Classic:
    Completed: Zelda NES Remastered, Demo 1st Quest, Demo 2nd Quest, James Quest: Remastered (V 2.1), Memorial Quest, New Quest 2 2015. New Quest: Rebuilt
    In development: Demo SP, James Quest: Remastered (V 3.0)t, 6QI

  6. #16
    Octorok Binx's Avatar
    Join Date
    Feb 2006
    Age
    36
    Posts
    157
    Mentioned
    9 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,220
    Level
    11
    vBActivity - Bars
    Lv. Percent
    95.41%
    Quote Originally Posted by Zim View Post
    I wasn't arguing. I was merely stating that one message script and one item script would solve this for you.. It's just as much effort on your part to use 1 or 2 ffc scripts and enjoy all the freedoms they would bring to your game, and they're already done.

    I already knew (at one point) that guys were NPC, in fact, summon NPC scripts can spawn "guys."
    The only difference here is that.... wait a minute..
    Why not just make a blank guy (no graphic) and use an invincible NPC? At that point you'd just have to fix it's coordinates (script).
    Why, yes, I suppose I could. But I (as i have said twice already) DON'T LIKE USING SCRIPTED NPCs. So why should I have to? Guys are enemies, so why can't we edit them in the enemy editor? I mean, that alone makes no freaking sense.

    And there's no "you just have to..." with people who DON'T ALREADY KNOW SCRIPTING. Maybe some people have a hard time with learning programming languages. Did you ever think of that?

    EDIT: Sorry, I was being a bit short tempered. I'm better, now. But the point still stands, I don't understand why you're so resistant to the idea that we'd be able to edit the guys. Not being able to add more, I get that, because it could cause a lot of problems because of the way the engine is built, but I don't understand why we can't at least edit the tiles and Csets being used for the guys. I mean, it seems to me it would have taken EXTRA programming to tell the enemy editor to NOT allow you to edit the guys, if they're made using the same coding as enemies in the game. I mean, I'm sure you don't mean to, but you come off as though the existence of scripting is a good enough reason to stop development and improvement of the ZQuest editor in general, and that just seems totally counter-productive to the entire idea of ZC in the first place.
    Last edited by Binx; 08-14-2013 at 10:48 PM.
    Please check out my current project, The Legend of Zelda: Trials of the Gods
    http://armageddongames.net/showthrea...ls-of-the-Gods
    Current release: V3.1 (Demo)

  7. #17
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,560
    Level
    30
    vBActivity - Bars
    Lv. Percent
    51.7%
    Okay, so this isn't the perfect solution or for the script-averse but it should be very simple for anyone. Obviously you need to know how to use basic scripts.

    Code:
    const int GUY_CUSTOM = 9; //what "Guy" to change; refer to NPC_ constants in std_constants.zh
    
    int guyTile; //global variables that the scripts use
    int guyCSet;
    
    //script checks for and changes the "Custom Guy"
    global script ChangeGuy
    {
    	void run()
    	{
    		int currScreen	= -1; //used for checking if you have changed screens
    		int currDMap = -1;
    		
    		while(true){		
    			if(Game->GetCurScreen() != currScreen || Game->GetCurDMap() != currDMap){
    				if(Screen->NumNPCs()){				
    					for(int i = Screen->NumNPCs(); i > 0; i--){ 
    						npc enpc = Screen->LoadNPC(i); 
    						if(enpc->ID == GUY_CUSTOM){
    							enpc->OriginalTile = guyTile;
    							enpc->CSet = guyCSet;
    						}
    					}
    					currScreen = Game->GetCurScreen(); //saves current screen 
    					currDMap = Game->GetCurDMap();	//saves current dmap
    				}
    			}
    			Waitframe();
    		} //end of while loop
    	}  //end of run
    } //end of ChangeGuy
    
    ffc script setGuy  //use on the screen with the cave entrance
    {
    	void run(int tileNum, int csetNum)
    	{
    		guyTile = tileNum; //tile number to change the guy to
    		guyCSet = csetNum; //cset number...
    	}
    }
    This is the only way I can think of to have "Custom Guys" with NES Caves. All it does is change the CSet and Tile of one of the Guys (the one assigned to GUY_CUSTOM; set by default to ABEI2). You have to set the FFC script on the entrance screen and D0 to the tile number and D1 to the CSet. If you do not do this then your "Custom Guy" will change to Tile 0 on CSet 0. Also these values will not reset so if you set it on one screen and not another the same "Custom Guy" will appear as the last one visited (or Tile 0 if you haven't visited any).

    Once you have compiled the scripts and assigned them to slots. Go to the screen where you want your "Custom Guy" and set it up as normal and pick ABEI2 as the Guy. Set an FFC script with a blank combo and the script setGuy. Make sure you set D0 and D1 arguments to the correct values. That's it!

    Quote Originally Posted by lineas View Post
    Why, yes, I suppose I could. But I (as i have said twice already) DON'T LIKE USING SCRIPTED NPCs. So why should I have to? Guys are enemies, so why can't we edit them in the enemy editor? I mean, that alone makes no freaking sense.

    And there's no "you just have to..." with people who DON'T ALREADY KNOW SCRIPTING. Maybe some people have a hard time with learning programming languages. Did you ever think of that?

    EDIT: Sorry, I was being a bit short tempered. I'm better, now. But the point still stands, I don't understand why you're so resistant to the idea that we'd be able to edit the guys. Not being able to add more, I get that, because it could cause a lot of problems because of the way the engine is built, but I don't understand why we can't at least edit the tiles and Csets being used for the guys. I mean, it seems to me it would have taken EXTRA programming to tell the enemy editor to NOT allow you to edit the guys, if they're made using the same coding as enemies in the game. I mean, I'm sure you don't mean to, but you come off as though the existence of scripting is a good enough reason to stop development and improvement of the ZQuest editor in general, and that just seems totally counter-productive to the entire idea of ZC in the first place.
    Saffith has already stated that it isn't Trivial. It didn't take extra programming to tell the program not to let you edit Guys. Guys were coded long before the enemy editor ever existed. Though the are technically Enemies the engine handles them differently enough that it isn't as simple as just letting you edit them. Your best bet until (I am just guessing) 2.6 comes out is the script I just posted.

  8. #18
    Octorok Binx's Avatar
    Join Date
    Feb 2006
    Age
    36
    Posts
    157
    Mentioned
    9 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,220
    Level
    11
    vBActivity - Bars
    Lv. Percent
    95.41%
    Well, of course it's not something that would be available NOW, this is the suggestions forum in a thread for suggestions for future versions of ZC. And maybe I misunderstood what Saffith said, but it seemed like the statement was that making them EDITABLE was easy, it would be a problem with being able to add new guys because of how the engine handles their ID numbers. But I stand by my statement that this is a perfectly valid suggestion that probably should have been implemented a while ago. But thank you for the script, anyways. (For the record, I'd say it's about the most perfect solution we could hope for right now, because it does exactly what I'd want it to)

    EDIT: Ok, i didn't see the part that said "Next release" I don't think this would be in anything before 2.6 at least because it's such a major change to the way things are currently set up. I mean, if changing the whistle warp to warp ring 8 was enough to screw up 2.1 quests, I can only imagine the kinds of problems this would cause if it was put in a 2.50 update.
    Last edited by Binx; 08-15-2013 at 01:42 AM.
    Please check out my current project, The Legend of Zelda: Trials of the Gods
    http://armageddongames.net/showthrea...ls-of-the-Gods
    Current release: V3.1 (Demo)

  9. #19
    Admiral Zim's Avatar
    Join Date
    Oct 2012
    Posts
    388
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    1,699
    Level
    13
    vBActivity - Bars
    Lv. Percent
    82.73%
    I think 'none' & use a combo is probably the simplest workaround right now.
    A code like Succesor's activated with menus on ZQ is fundamentally the easiest way to implement what you're asking for.
    Code:
    CreateNPCAt(1,120,80);
    would spawn Guy ID #1, and not change room properties.
    So..
    Code:
    ffc script GUY
    {
    void run(int a, int b, int c)
     {
      if(Screen->NumNPCs()>1)//actually superfluous because you already know there's an NPC on screen, and you wouldn't use this code on a screen without one.
       {
       npc GUY=Screen->LoadNPC(1);//Makes an assignment for the NPC, which there is only one of for now.
       GUY->Tile=this->Tile; GUY->CSet=this->CSet; GUY->X=this->X; GUY->Y=this->Y; //Sets the guy's characteristics to this ffc's stuff.
       }
     }
    }
    Would set the guy at the ffc's coordinates with tile of the ffc and cset of the ffc... so that's another option. Just like Succesor's except that it uses the ffc's tile and cset. :)
    The room type would be selected by the menu, so in essence this is pointless, as selecting 'none' and drawing over the guy is just as effective.

    Sorry if I came across as sounding like deleting ZQ was the answer.
    Last edited by Zim; 08-15-2013 at 12:46 PM.

  10. #20
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,560
    Level
    30
    vBActivity - Bars
    Lv. Percent
    51.7%
    Quote Originally Posted by Zim View Post
    A code like Succesor's activated with menus on ZQ is fundamentally the easiest way to implement what you're asking for.
    Code:
    CreateNPCAt(1,120,80);
    would spawn Guy ID #1, and not change room properties.
    So..
    Code:
    ffc script GUY
    {
    void run(int a, int b, int c)
     {
      if(Screen->NumNPCs()>1)//actually superfluous because you already know there's an NPC on screen, and you wouldn't use this code on a screen without one.
       {
       npc GUY=Screen->LoadNPC(1);//Makes an assignment for the NPC, which there is only one of for now.
       GUY->Tile=this->Tile; GUY->CSet=this->CSet; GUY->X=this->X; GUY->Y=this->Y; //Sets the guy's characteristics to this ffc's stuff.
       }
     }
    }
    Would set the guy at the ffc's coordinates with tile of the ffc and cset of the ffc... so that's another option. Just like Succesor's except that it uses the ffc's tile and cset. :)
    The room type would be selected by the menu, so in essence this is pointless, as selecting 'none' and drawing over the guy is just as effective.
    There are a couple problems with this script. Most importantly is NES Caves recycle the same screen so FFCs aren't possible. [Actually I am not sure if FFCs can carry over from the entrance screen to an NES Cave. Even if that would be a more complicated approach.] Another thing is the fire in NES Caves are NPCs as well and I am pretty sure they spawn first and the Guy last. You can disable the fire in caves but the script doesnt account for it. You also cannot effectively write to npc->Tile. You have to use npc->OriginalTile. Also the FFC script will probably run before NPCs have spawned so checking for them will be ineffective.

    I could add in values for X and Y coordinates in my script but that would take up 2 more global variables. If someone requests this I can do it easily.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social