Programe - Sprites

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

Programe - Sprites

Postby shaggy » Sat Oct 13, 2007 10:06 am

Does any one know what program is needed to open the sp2 file?

Also, if I was to add one, how would I go about that.
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby Morphed » Sat Oct 13, 2007 12:32 pm

sp2 is just list of files so to edit find that file its pointing at
to make it download http://icculus.org/twilight/darkplaces/ ... 070412.zip and use makesp2.exe
i wonder why you didnt discover it yourself ;)
Morphed
Alien
 
Posts: 197
Joined: Tue Feb 28, 2006 10:41 pm
Location: Poland

Postby shaggy » Sat Oct 13, 2007 12:45 pm

Thanks.

The reason I only breifly looked wa because I had no idea where to start.
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby Morphed » Sat Oct 13, 2007 2:19 pm

i wonder why you didnt discover it yourself
that was a joke
sprite tool inside modeltools20070412.zip is not obvious + i have no idea if there is some written info about this file in the internet :)
Morphed
Alien
 
Posts: 197
Joined: Tue Feb 28, 2006 10:41 pm
Location: Poland

Postby divVerent » Sat Oct 13, 2007 2:27 pm

Nexuiz 2.4 won't use SP2s any more, as the sprites will get a new projection type and SP2 does not allow spefying that. The new format will be SPR32. A tool to make SPR32 files has been written by me, but it's in Perl.

The tool to make these files is contained in the Nexuiz sprites directory for now, as it is quite small and won't waste much space there.

Also, there will be a script that calls Inkscape (open source vector graphics app) to make the sprites seen in Nexuiz, so you can just add your own sprite to the list in that file, regenerate, and use it. They are defined like this:

Code: Select all
sprite bluebase           0000ff 000000 "BLUE BASE"
sprite danger             ff0000 ffff00 "DANGER"
sprite flagcarrier        ffff00 000000 "FLAG CARRIER"
sprite helpme             ffff00 ff0000 "HELP ME"
sprite here               00ff00 000000 "HERE"
sprite key-dropped        00ffff 000000 "DROPPED KEY"
sprite keycarrier-blue    0000ff 000000 "KEY CARRIER"
sprite keycarrier-finish  00ffff 000000 "RUN HERE"
sprite keycarrier-friend  00ff00 000000 "KEY CARRIER"
sprite keycarrier-pink    ff00ff 000000 "KEY CARRIER"
sprite keycarrier-red     ff0000 000000 "KEY CARRIER"
sprite keycarrier-yellow  ffff00 000000 "KEY CARRIER"
sprite redbase            ff0000 000000 "RED BASE"
sprite waypoint           008080 000000 "WAYPOINT"
|
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby shaggy » Sun Oct 14, 2007 4:53 am

Thanks. The zip file doesn't do anything, all it does it open command prompt.

This is what I want to do.
I want to create a sprite that floats above your head for the game. I think the way I'll do this is by copying Flag carrier sprites and replacing the tga file with mine and rename them both.

This is for GT, like a playermodel, but different. I know that only people on your team would be able to see it.

This is still very unclear to me, could someone step me through what I have to do.
- How to define the command (what command will make it show)
- How to modify how long it's visible for
- What to modify the files needed to be modifyed with
- Where the files are located (Is it in data/dlcache/waypoint.pk3)

Thanks for the help.
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby divVerent » Sun Oct 14, 2007 8:11 am

You expect too much, what you want to do is quite complicated.

The steps that you would ACTUALLY need to take to implement this are:

  • Make a new sprite. And yes, the tool in the zip file does something - but it is a command line tool. Won't work by double clicking.
  • Edit cl_impulse.c to make an impulse that displays the sprite. If it should be just temporarily attached like HELP ME, just use the WaypointSprite_Attach function for it. If not, call WaypointSprite_Spawn directly (that would also make it possible to show the sprite to everyone).
  • |Edit waypointsprites.qc to add a precache_model() line for your new sprite to the others.


What WaypointSprite_Attach actually does, is:

Code: Select all
WaypointSprite_Spawn("spritename", [how long it should live, or 0 for forever], [from how far it should be visible, or 0 for the whole map], self, '0 0 64', world, [team who shall see the sprite, or 0 for all teams], self, waypointsprite_attached, FALSE);
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby shaggy » Sun Oct 14, 2007 8:17 am

Thank you for the help, I understand what I have to do better now.

Where is this file located? cl_impulse.c I've looked in data20070531.pk3, enginesource20070531.zip and gamesource20070531.zip. Have I even looked in the right places? Or have I over looked it?

But my final question about this for a while is, how do I use the command line tool? what steps should I take? Sorry about this question.
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby divVerent » Sun Oct 14, 2007 9:12 am

The files I was referring to are in gamesource...zip and need to be compiled using fteqcc.

Well... open a cmd prompt and run modeltool from there. It will tell you how to actually use it.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby shaggy » Sun Oct 14, 2007 9:21 am

I can only find cl_impulse.qc
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Next

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron