Help!

Freeform discussion about anything related to modding Transcendence.
Icabod458
Miner
Miner
Posts: 44
Joined: Mon Mar 27, 2006 4:57 pm

I have been writing different code for a long time. Not XML or the scripting used for Transcendence but C, COBOL, Java, etc. If you used the code FAD posted, the error "insufficient arguments" is caused by the line (objGetNearestStargate gSource) &svTalon;). If you would put a ( at the beginning of that line, it should fix it. You have to remember when you use () they have to be paired up. in the line in FAD's code there is only one pair and the one at the end of the line has no meaning and causes the error. Since I am a coder and know they have to be paired, one at the beginning of the line should do the trick. But as I said, I am not too familiar with XML or the script used for the game itself so I do not know if this will work or not. All I can say is try it.
Yugi
Fleet Officer
Fleet Officer
Posts: 1027
Joined: Sun Mar 05, 2006 8:21 am

I'm pretty sure George (the developer) said he fixed that problem.
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

Icabod458 wrote: the error "insufficient arguments" is caused by the line (objGetNearestStargate gSource) &svTalon;). If you would put a ( at the beginning of that line, it should fix it.
nope, got the same error.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Try something more like:
(block (ship)
(setq gStart (objGetNearestStargate gSource))
(setq ship (sysCreateShip &scTICCruiser; gStart &svTalon;))
(shpOrderEscort ship gPlayerShip)
(shpOrderGate ship)
)

And if that doesn't wok, try removing the (shpOrderGate ship) line.
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

Curious, if you're getting an "insufficient arguments" error, I have a dumb question...
Are you trying to use your ROM in a system that has no Talon station in it or does it have one?
It would seem that the ROM would only work if there is a Talon station in the system, going by the "(objGetNearestStargate gSource) &svTalon;)" code. And if this is the case, that ROM would be limited use-wise in that at least one of your stations must be present.

At any rate, here is the code I used in a mod that does work;

Code: Select all

<Invoke key="K">
			(block (ship)
				; Create the ship
				(setq ship
					(sysCreateShip 
						&scServMuleAuton;
						(objGetPos gSource)
                                    &svFriendlyAuton;
						"auton"
						      )
                                    )
                        ; Escort Playership
                          (shpOrderEscort ship gSource)
				       		)
						)
                              )      				 
                        ; Identify the item
				(itmSetKnown gItem)

				; Construction completion message
				(objSendMessage gSource Nil "Service Mule Auton assembly complete.")

				; Remove the item from the player's list
				(objRemoveItem gSource gItem 1)
				)
		 </Invoke>
The above code is used in an assembly kit that creates a unique mule that has all the bells and whistles anyone would ever need. :P
Anyway, you may be able to alter "(objGetPos gSource)" to something like "(objGetPos (objGetNearestStargate gSource))" maybe if all else fails?
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

I've managed to get my other auton to appear from the gate while I was messing around, so I'm not sure what's wrong.
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

Well, not sure but if you still have that other mod you could try using its code and swap the ship that you want?

I was looking around the XML's and came across this little bit from the BM bounty and replaced the bounty with your ship, swapped the "shpOrderAttack" with the escort order. It should create your ship through the nearest gate and then become your escort:

Code: Select all

(block (ship)
	(setq ship (sysCreateShip &scTICCruiser; (objGetNearestStargate gPlayerShip) &svIndependent;))
		(shpOrderEscort ship gPlayerShip)
  )
)
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

okay, I'll try that.

EDIT: it works! Yay! *gives FAD cookies*
Now, I'm going to try and make it commandable like a wingman. (I'll try to do this myself, since I should do at least some work on my mod)
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Sheesh, I posted the same thing 2 days ago, and I include a piece to make the ship "jump" into the system. I'm not feeling any love here ;)
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

aww.. sorry. Seems I'm screwing up more and more recently...

anyway, I have it controllable as a wingman!
User avatar
FAD
Militia Captain
Militia Captain
Posts: 732
Joined: Thu Aug 10, 2006 5:33 am
Location: Area 51

My apologies as well, Burzmali. I had assumed that by the replies your code didn't work either. Guess I need to stop assuming so much. Anyway, many of us modders here really appreciate and value your input. You've helped me a lot, that's for sure.

@ evilbob, Glad you got it to work and have a controllable wingman. I'd like to see it if you decide to release it.
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

It's released.
Get the TIC.zip from the "TIC here" link in my sig.
Its a veryrare ROM costing 20,000cr, and it will summon a TIC cruiser from the nearest gate. It acts like an auton, but due to it being a wingman, you can put it in formations (I reccomend gamma formation, since friendly fire is increased in other formations.)
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

I need some help with this. Its meant to escort the player's target, but it has no effect.:(

Code: Select all

		<Communications>
			<Message name="Escort target" key="E">
				(if (objGetTarget gSender)
					(block Nil
				(objCommunicate gSource gSender (shpOrderEscort gSource gTarget))
										(objSendMessage gSender gSource "Command recived. Escorting target")
					))
			</Message>
					</Communications>
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Try this:

Code: Select all

<Communications> 
  <Message name="Escort target" key="E"> 
    (if (objGetTarget gSender)
      (block Nil 
        (shpOrderEscort gSource (objGetTarget gSender)) 
        (objSendMessage gSender gSource "Command received. Escorting target") 
        ))
  </Message> 
</Communications>
The objCommunicate command uses a hard-coded routine (the number). This should work, but you could try using different numbers in objCommunicate command until you find the one for escort.
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

okies, I'll give it a go :)

oh, btw. using the code I posted earlier, that causes the ships to escort the targer when you die, instead of gateing

EDIT: yeah, your code has the same effect. the ship ignores the order untill you die.
Post Reply