Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google

Members: 0
Guests: 22
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » 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, 10:52 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
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, 3:52 pm
Go to the top of the page
Go to the bottom of the page

Andril
Magician
GroupMembers
Posts147
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 28, 2010, 10:40 pm   Last edited Jun 28, 2010, 10:47 pm by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
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

space.c
void do_salvage (is used instead of do_sellship)

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

Andril
Magician
GroupMembers
Posts147
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 >>