question about a unid # and other stuff

Freeform discussion about anything related to modding Transcendence.
Post Reply
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

I have been trying to make my mining ships mine : kind of like the mining auton :
unfortunately : they do not obey anything i tried.

to 'mine is to fake it: i actually wanted to see lasers shooting so I decided to look at the mining auton and see if I could pull it apart if it worked on the Borer.....far too complicated for that and even using the code the ship refuses to pick up the ores.....

Ill be trying to tinker with it as i go along and my hope it to use the code as a working base
( benchmark ) for editing in things that ( hopefully ) work and THEN ill have a totally different code that ( hopefully ) works...

However I was going to ask a question to the person that made the mining auton : Apemant

but it appears that the unid is no longer in the list on the unid database : and I was wondering why , if the unid is valid and in use by players are the unids no longer assigned in the list .

I understand if the person is on their way to the Core, we all are....but if they left behind some spare parts that players are using : I think it would be nice if the serial numbers were not scratched off ( it also makes it easy to spot frauds or unauthorized unid uses like the two I caught recently )

now i forgot the question I was going to ask : but there HAS to be a simpler way to make the ship do that....it should not need all that specialty code to shoot a rock.

EDIT: I gave up , at least for now, I KNOW what I want but the ship is being a total Dwarg about it.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

(shporder ship 'mine)

that is all
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

'mine doesn't work, and only functions when ships have the ferian controller. The ships don't even mine. They just dock to the asteroid, never bothering to shoot for ore. As for mining, I have a super preliminary event handler that has some kinks, but it works. I'll post it when I get home.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

RPC wrote:'mine doesn't work, and only functions when ships have the ferian controller. The ships don't even mine. They just dock to the asteroid, never bothering to shoot for ore. As for mining, I have a super preliminary event handler that has some kinks, but it works. I'll post it when I get home.
thank you , sdw195 & RPC : but I DO have ships that mine ( ferian controller ) . I actually have mining ships spawning and acting like ferians :
except at one station, its not a good idea to hit the station or kill a miner : the miners attack without turning Hostile.
In another station they are Hostile but do not attack the player : so long as you say away from their station :) but that is where the goodies are!! :)


nvm. I gave up.
Last edited by shanejfilomena on Thu Nov 10, 2011 10:51 am, edited 1 time in total.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

just have a onupdate event that checks for an asteroid within x dist and if true fire a weapon at it, check for ant ore coming out and grab that. shouldn't be to hard
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

sdw195 wrote:just have a onupdate event that checks for an asteroid within x dist and if true fire a weapon at it, check for ant ore coming out and grab that. shouldn't be to hard
so we would think : obviously I wanted something out of my league. I'll just let it go.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Here's the event handler btw, if anyone wants to look at it/ work on it:

Code: Select all

<!--Mining Event Handler-->
	<ShipClass UNID="&evMining;"
			class=				"(wingman base class)"
			virtual=			"true"
			
			attributes=			"behaviourClass"
			>
			
		<Events>
			;known problems:
				;they get stuck on an asteroid
				;they need a better mining apparatus
				;aparently there is a mod that makes this work... uh-oh
			<StartMine>
				(sysAddObjRecurringTimerEvent 10 gSource "Mining")
			</StartMine>
			<Endmine>
				(sysCancelTimerEvent gSource "Mining")
			</Endmine>
			<Mining>
				(block Nil
					;(plymessage gPlayer "mining")
					;(shpOrder gSource 'hold)
					(switch
						;go back to base when full
						(ls (objGetCargoSpaceLeft gSource) 15)
							(block Nil
								(shpOrder gSource 'dock (objGetObjbyID (objGetData gSource "Origin")))
								)
						;get ore
						;and the ore asteroid has free docking ports
						(and 
							(setq ore (sysFindObject gSource "Nt:ore"))
							(eq (objGetOpenDockingPortCount ore) 4)
							)
							(block Nil
								(plymessage gPlayer "docking to ore")
								(shpCancelOrders gSource)
								(shpOrder gSource 'dock ore)
								;collect until full or no more ore
								(enum (objGetItems ore "*") oreinAsteroid
									(block Nil
										(setq left (objGetCargoSpaceLeft gSource) )
										; split ore to fit our cargo space left
										(if (gr (itmGetCount oreinAsteroid) left)
											(setq oreinAsteroid (itmCreate (itmGetUNID oreinAsteroid) left)))
										(objRemoveItem ore oreinAsteroid)
										(objAddItem gSource oreinAsteroid)
										)
									)
								)
						;if none applies:
						;look for asteroid and fire at it
							(block (asteroid)
								(setq asteroid (sysFindObject gSource "Nt:asteroid"))
								;(setq asteroid (random (sysFindObject gSource "N:50; T:asteroid")))
								(shpCancelOrders gSource)
								(shpOrder gSource 'attack asteroid)
								)
						)
					)
			
			</Mining>
		</Events>
	</ShipClass>
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

shanejfilomena wrote:
sdw195 wrote:just have a onupdate event that checks for an asteroid within x dist and if true fire a weapon at it, check for ant ore coming out and grab that. shouldn't be to hard
so we would think : obviously I wanted something out of my league. I'll just let it go.
you dont have to let it go just yet, it is relatively easy just look on xelerus and the wiki for functions, or join the irc for help :)
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

If all else fails, maybe an autodefensedevice set up to target asteroids only?
Mischievous local moderator. She/Her pronouns.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

THANK YOU , everyone :)

I KNOW I can do it: but I obviously still have alot more to learn from you all as I have slowly learned over the time so far.

I will not give up on the Borer-IV , I will just put it on the side for a different .xml . As it is Corporate Contracts is a much larger file then I am used to : after I play it out I will decide what stays or goes.

but for right now, I think the mining ships can wait until the next round of insanity.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
Post Reply