User Name:


Forgot your password?
Vote for Us!
AFKMud 2.2.2
Mar 3, 2019 5:35 pm
By Samson
Nov 28, 2018 12:10 pm
By Keirath
First Immortal
Oct 12, 2018 2:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018 7:31 pm
By joeyfogas
question on overland code
May 31, 2018 12:03 pm
By joeyfogas
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
AFKMud 2.2.2
Author: AFKMud Team
Submitted by: Samson
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
Users Online

Members: 0
Guests: 12
Newest Member
Today's Birthdays
tphegley (37)
Related Links
» SmaugMuds » Codebases » SWFOTE FUSS » Prototype Ships system
Forum Rules | Mark all | Recent Posts

Prototype Ships system
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 27, 2010 12:52 pm
Go to the top of the page
Go to the bottom of the page

Off the Edge of the Map
JoinedMar 21, 2006

So I was poking about FotE trying to find some kind of inspiration to finish my space system and I couldn't quite figure out how the prototype ships work. How exactly do the rooms and stuff get assigned to the ship? How exactly do you go about actually making the prototype ships? Anyone have any insight?
Post is unread #2 Jun 27, 2010 5:52 pm
Go to the top of the page
Go to the bottom of the page

JoinedJun 9, 2009

The majority of the prototype ship stuff in handled in ships.c. I just put space v2 in to replace stock SWR's space, which was rather interesting. :)

To create a prototype you have to create a new ship using the makeship/setship commands. Then you use the makeprototypeship command, passing the name of the ship you want to use as the template as an argument, among other things. Everything set on the template ship that the prototypes need is shoved into a struct of structs, struct ship_prototypes_struct ship_prototypes[256];, and then it gets saved.

When you create a new ship from a prototype a new ship is created, the function int find_vnum_block( int ) looks for a free contiguous group of vnums in the ship area, the rooms are set as needed from the prototype, and you have a new ship. That's pretty much it in a nutshell.
Post is unread #3 Jun 29, 2010 12:40 am   Last edited Jun 29, 2010 12:47 am by ayuri
Go to the top of the page
Go to the bottom of the page

JoinedJun 13, 2008

Ok, so to build ships in game the makeprototype is broken (last I looked or had major issues). To make an new ship you need to make a *.proto file and drop it in the ships folder. Also, then add the file name to prototype.lst file. My advice is best to look at the A-wing as a stat and then an SSD for an example how progs and what not work, specially for the turbolift progs. Once your new ship is in, you do a quick hotboot and your good to go.

There is no real easy way to OLC ships in fote. You can build an area and then use the setship command to set start room, ending room, weapons and all that good stuff (used that myself for an RPSHIP) but as far as I know, you cannot copy that ship as a template. I have a sneaking feeling that it was going to be that way at one point (write out the ship file as a prototype file).

Also, ships can have flags set on them too, but I do not think the flags can be set in the .proto file. It has to be set once the ship is bought/created in the game. A lot of the flags are used for telling if the ships weapons or what not are disabled. But also for simulator, and my fav nodestroy :D

SWR vs SWFOTE ship system is pretty different when it comes to the physical ships. You'll want to take a look at tech.c ships.c and space.c. That's where all the fun stuff is. As too the rooms how they get assigned from a proto file to the vnum - there is a value called Numrooms so, you have a ship with 4 rooms and you set it to three, one room get's knocked off. Bad joojoo.

I'm pretty tired atm but if you want, tomorrow when i get some time I'll try to break it down piece by piece as best as I could when I went digging though the code.

Functions of intrest ships.c
void do_ordership
void load_ship_prototypes

void do_salvage (is used instead of do_sellship)

Hope this helps in some point,
Post is unread #4 Jun 30, 2010 12:50 am   Last edited Jun 30, 2010 3:08 am by Andril
Go to the top of the page
Go to the bottom of the page

JoinedJun 9, 2009

I noticed when going over the stock FotE stuff that there's definitely an issue with the syntax/usage messages sent when there aren't enough arguments passed to the makeprototypeship command. Other then that, haven't really looked super close, there doesn't seem to be an issue. As far as I can tell you're supposed to create the ship before hand and it's simply used as a template for the new prototype. Should then be able to delete that hand created ship and make copies on the fly. Or were you meaning something along the lines of:
Command: makepship X-Wing
From mud: new prototype ship created: X-Wing
Command: setpship x-wing cost 5000
From mud: X-Wing prototype costs 5000
Command: saveprototypes
From mud: Prototypes saved to disk


Hmm. I created an olc way to create/edit parts for ships in the space v2 system. Might try to copy/modify it to alter ship prototypes too. Room settings might be a little problematic but I think I could do it. I need to add in a way to assign parts to ships anyways heh.

Edit: Wow. Just tested makeprototypeship and it is indeed messed up. Seems to not want to save rooms. Probably some other stuff as well.
Pages:<< prev 1 next >>