[Little questions] Where to find? How can I?

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators


  • I go on the nexuiz quakec code and change miror things (like nex damage which are proportionnal to speed). But Im newbe in quake programming and didn't found all I want.

    then some questions appears:

    - where is the hud draw function?
    - where is the score draw function?
    - How can i draw on the screen (to make icon like in quake3 when we got an impressive shot)?

    thats all for now but others questions will come :)

    thanks a lot for all that is made here(all the answers of my questions).

    And sorry again for my english
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm


  • KICK wrote:- where is the hud draw function?
    - where is the score draw function?

    These are both engine-level due to the design of Quake.
    KICK wrote:- How can i draw on the screen (to make icon like in quake3 when we got an impressive shot)?

    I'm honestly not sure how to draw graphics from qc, though I'm sure it must be somehow possible, I know adding text is simple enough.
    --Willis
    User avatar
    Willis
    Site Admin
     
    Posts: 168
    Joined: Tue Feb 28, 2006 7:00 pm
    Location: Wisconsin, USA


  • Willis wrote:I'm honestly not sure how to draw graphics from qc, though I'm sure it must be somehow possible, I know adding text is simple enough.

    Unless i'm mistaken icon drawing is also engine level.. So Kick would have to change the engine code and compile him self an own engine.
    Well and there is ClientSideQuakeC (CSQC) but its relativly new and not matured yet. There is a stub in Nexuiz/data/qcsrc/client and it should be possible to use it to draw all kind of stuff on the screen. But i have not really looked into it. KadaverJack did this stub for Nexuiz so he might know much more then i.
    Last edited by esteel on Thu Aug 31, 2006 2:56 pm, edited 1 time in total.
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Thu Mar 16, 2006 1:43 am

  • Well, the current csqc code works, but doesn't do much yet... It just "tells" the engine to draw hud, viewmodel, etc. and updates the viewing direction.
    But there are some engine bugs with csqc: it works only on listen servers, there are no dynamic lights on rockets and spectators can't move...

    So you can toy around with it a bit, but don't expect it to be usable :)
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Fri Mar 17, 2006 5:41 pm

  • OK, then I cant modifie the hud with a mod. if I print a text each frame does it slow the game or not.
    The print function isn't made to be called each frame then it can slow the computer?

    I make a mod with a experience based system and i want to show the player how much xp he have.
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Sat Mar 18, 2006 12:08 am

  • KICK wrote:OK, then I cant modifie the hud with a mod. if I print a text each frame does it slow the game or not.
    The print function isn't made to be called each frame then it can slow the computer?

    I make a mod with a experience based system and i want to show the player how much xp he have.

    Calling print each frame is not problematic for the client, but it can produce quite a lot of traffic.
    And you would have to use centerprint (because sprint would spam the message area, making it impossible to chat (and quite annoying)), which causes another problem: the engine displays only one centerprint at a time, so you would have to take care of that in qc code...

    The best solution would be to add support for the xp display in the engine. (well, that's not entirely true... getting csqc to work properly would be even better :P)
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Fri Mar 24, 2006 10:20 pm

  • I have to create a new entity for my nexuiz mod. I need to modify nexuiz_ents.def to put this entity definition in gtkradiant, but dont have any idea on how do this. I didn't find any tutorial on the subject.

    I think I just have to create the entity with a name and call the name entity to control.
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Wed Apr 12, 2006 1:41 pm

  • I think i found how put an entity in ents.def. I try to put a md2 model into nexuiz, to replace the machinegun, but my model is very small, I try to scale it but it doesn't grow :/

    And my second problem is the model doesn't have any texture, I create it but I don't know where put the texture and how lonk the texture to the model.

    Prevent me from suicide please :)
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Wed Apr 12, 2006 4:36 pm

  • You just want to replace the machine gun model?
    The easiest way to do that is to create the subfolders models/weapons/ in you Nexuiz/data/ dir and and place the model there.
    You will actually need three files:
    g_uzi.md3 - that's the model for dropped/placed weapons on the map
    v_uzi.md3 - the model that other people will see when you are holding the uzi
    w_uzi.zym - that's the model you will see (this one should have firering animations, but it'll work without them for testing)

    You can just rename your md2 model to replace those files, the engine doesn't care if a *.md3 file really contains a md3 or any other supported format.
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Wed Apr 12, 2006 9:33 pm

  • i don't just wanna replace the machine gun, I wanna test the model.
    I'm creating a big modification for nexuiz:

    I tried to combine the gameplay of a FPS and the gameplay of dota(a mod for warcraft3). It names NEX HEROS.

    A little description:
    There's 2 teams with 2 bases. both teams got outposts and outpost can be capture by other team. The game ends when the ennemy base is captured.

    To capture a outpost, you have to destroy it. When you got an outpost, you can respawn on it.

    Each player got 2 powers and 2 attack methods.
    You can launch a fireball(a rocket for the moment) or a laserbeam.
    When you kill an ennemy, you got some experiences points, and you can up your level.
    At level up, you shoot more faster, you are stronger and your life regeneration is increase. Your power are more devastating too.

    I have done some work for the moment but I'm working alone. I just learn the code for the moment and try to resolve some problems like put a model in the map.

    I make the weapons system, and the experience system and now I wanna create the base and outpost. When lot of work will be done, I will ask for a modeler to make some heros.

    but now I just try to create a new entity :)
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Wed Apr 12, 2006 10:51 pm

  • OK I understand how create my base entity and i put it on nexuiz_ents.def. But my model doesn't have any texture and I don't know how link th etexture to the model. Please help me.
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Wed Apr 12, 2006 11:52 pm

  • KICK wrote:OK I understand how create my base entity and i put it on nexuiz_ents.def. But my model doesn't have any texture and I don't know how link th etexture to the model. Please help me.

    The name of the texure is part of the model itself. So you have to set the texture in whatever 3D modeler you are using (sorry, can't help you with that, i'm not a 3D artist :)). If you set the texture to "mytex.jpg" for example, you have to copy the file to Nexuiz/data/textures/mytex.jpg.

    And if you want to place a new entity on you map, you need to have a function in your qc code with the same name as the new entity's classname.

    For example, when you have a entity
    Code: Select all
    {
    "classname" "base_team1"
    "origin" "23 42 0"
    }
    you'll need a function like that
    Code: Select all
    void base_team1()
    {
        setorigin(self, self.origin);
        setmodel(self, "models/base_team1.md3");
        // more things that should be done with this entity on mapstart
    }


    With the nexuiz_ents.def however i can't help you (i'm not a mapper ;)), but it seems like you already have solved that problem.
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Mon Apr 17, 2006 12:08 pm

  • Hi dudes,
    I always got the same problem with textures. I create my model and his texture. I put the model in the game, but I can't link the model to the texture.

    Can anybody send me an exemple?

    edit:ok there's a problem with my exporter. I think i can resolve the problem.
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Wed Apr 19, 2006 10:27 pm

  • Another little problem:

    I have create an entity in the *.def file. I put this entity on the map and it load perfectly on the game, with the texture(yeah). But the origin of the entity is '0 0 0'.

    I affect the origin in the entity code with

    setorigin(self, self.origin);

    It seems the origin value doesn't send from the map to the engine.
    Does someone got an idea on this problem.

    Sry my messages are a bit annoying, but I'm noob with this engine.
    KICK
    Member
     
    Posts: 25
    Joined: Thu Mar 02, 2006 2:56 pm

Thu Apr 27, 2006 7:47 am

  • Argh people with mapping experiance should take a look at this thread. You can try to load your map, open the console and enter sv_saveentfile that will save a file data/maps/YOURMAPNAME.ent that does contain a list of all the entities. This file can normaly be used to edit and change your entities without the need to recompile your map. Guess its worth taking a look at the "origin" of you entitiy in that file. And to see if it helps changing it there..
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am



Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest