Minefield reworking.

Freeform discussion about anything related to modding Transcendence.
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

I'm working on ways to make minefields more viable as a weapon.....at present, you have to get really close to lay mines with a NAMI mine launcher.

I'm currently working on a new weapon that will allow remote laying of minefields.

The trouble is: I'm rubbish at coding, and the sheer number of fragments involved is pretty high. thanks to the sequences involved.....while it doesn't fire the thousands of shots of the Hellfire cannon that is my latest effort, the system has to launch a missile, which splits into a load of mines, which then stop, which then explode exactly like a CRM100, with fragments and all.

It's also my first attempt at a standard missile weapon.

The pastebucket is HERE

Line 25 gives an "Attribute expected" error. I'm not sure why, but it does.

There are probably basic errors (like forgetting to put tags around things)...but that's the point of asking..so I can learn.

If anyone can point out obvious errors (apart from the fact that, because I ripped code from the S3, the mines are going to scatter in a circle. Sorta.), so I can start work on seeing if this thing can actually work as a remote minefield system.
Last edited by Song on Tue May 25, 2010 8:12 pm, edited 1 time in total.
Mischievous local moderator. She/Her pronouns.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

try this:

Code: Select all

(setq minestrike (lambda Nil	
	(block Nil
		
			(for i 0 39
		 (Block Nil
			(setq theAngle (multiply i 9))
			(sysCreateWeaponFire &itStaticMine; gPlayership (objGetPos gPlayership) theAngle 30 Nil)
			)
		 )
	
			)))
It was for a planned weapon that i never released. :D
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

The reason you get the error on line 25 is because the previous tag is not closed properly. So, add a '>' at the end of the ItemType tag, more precisely, after the 'description' attribute.

Apart from that I can not really help you, as my knowledge of T weapons is limited... if you have more errors, just post them here :)
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Wolfy<---Which area of code does that belong in? It looks like it should work, once it's there though.....although of course I'll be needing to test like crazy once I've removed the annoying bugs (I'm down to the last few immediate gamecrashers. Wooo!)

The current headache is Line 115 now, close tag doesn't match the opener...which I can't find the actual error for. I've probably accidentally deleted a previous closing tag that needed to be put in.... Pastebin entry is HERE.



...of course, when I come to test this, it will probably be a hugely entertaining disaster.
Mischievous local moderator. She/Her pronouns.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

You have an attribute "sound" floating around on line 104. It should probably be inside the HitEffect tag.

Also on line 68 and on line 85 you open a <Fragment> but there is only one closing </Fragment> on line 114... I am not sure what the solution for that would be, depends on the weapon

As a general hint... for finding these errors easily, try indenting the different lines so they line up properly... Then it gets real easy to spot the missing or wrong elements
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

alterecco wrote:You have an attribute "sound" floating around on line 104. It should probably be inside the HitEffect tag.
Explain a bit further? It's set up the same as the earlier hiteffect stuff, which seems to work.......
Mischievous local moderator. She/Her pronouns.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Code: Select all

					<HitEffect> 
							sound=	"&snArmorHit1;"
This is not legal xml. It should probably be like this

Code: Select all

<HitEffect sound="&snArmorHit1;">
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Awesome weapon!

you may want to reduce the number of fragments a bit... my comp nearly had a seizure, but it did give me some time to marvel at the explosive awesomeness!

I had to modify your code a bit, it was missing some closing elements. The updated version is on pastebin.

I would suggest you get a text editor with a highlight feature. I use notepad++ but many others can vouch for jEdit. Both are free and make bugfixing infintely easier.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Nice. I've been changing it a bit:

-It now deploys 25 mines from the rocket, not 40
-The range is a little tweaked
-The mines scatter more, and scatter irregularly (ish)
-I'm working on adding a SECOND failsafe to the system...affecting the mines after they deploy from the lmissile. (That's the problem when you fire this at something past the failsafe distance. it arms, deploys the mines....which instantly trigger on proximity. The new failsafe will mean if you fire this AT something, it probably won't do much.)
-I'm going to change the name a bit to something that doesn't sound like something for mining ore ;)
-EDIT: I have just given the mines irregular lifetime....Minimum lifetime is 4005 (795 less than a standard CRM100), maximum is 4500. In theory, anyway. In practise, it isn't so scattered, but it DOES reduce lag really well.


It will STILL lag when it times out though ;)

Demo of how you can use this thing in its present still-not-balanced form:
Image
Yes, that was highly immature of me. Muahahahaha.:twisted:

How this is *supposed* to be used:

-Fire in front of an enemy fleet approaching, to damaged them BEFORE they get within missile range

-Booby trap an enemy station before blasting it, so the guards aint a problem.

-Fire PAST a fleeing enemy gunship to knock it out as it runs into the minefield as it tries to escape your guns.

-Nuking trade routes, and making stargates no-go zones for everyone. Usefill if your name is "Billy-bob", you drive a pickup truck, and you have a machinegun under your bed to shoot bottles with.

I am still working on balancing it though. ;)
Mischievous local moderator. She/Her pronouns.
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Question: Is it possible to make the launcher a usable item, to adjust the scatter area of the mines?.....I was thinking 3 modes, Normal, Cluster, and Scatter.....
Mischievous local moderator. She/Her pronouns.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Shrike wrote:Question: Is it possible to make the launcher a usable item, to adjust the scatter area of the mines?.....I was thinking 3 modes, Normal, Cluster, and Scatter.....
It's possible. You'll have to either swap launchers (see Northwind Armories Claymore) or switch between virtual weapons and use onfireweapon. (see Mines Plus for using syscreateweaponfire with virtual weapons on a launcher)
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Right. I've decided to settle for a "simple" method: Have it able to shoot CRM100s, CRM500s, and the new CRS100 and CRS500 mines. The CRS500 lobs out 8 CRM500s at a similar point to where the CRS100 lobs out 12 Fatboys. (Having it shot 20 was still really OPed)

I'm still considering adding support for additional mines, to expand the present mine system to the point where it's a more viable path (yes, mines are the best way to annoy pursuers. But they're still not exactly..brilliant....)

Any ideas for mines would be appreciated....I'm considering mines that explode like a 98R Thermo-MAG, or possibly a better cluster explosion. Maybe even a mine that blasts out jets of plasma?

The pastebin is HERE. Please take a look at it and see if the glitches can be ironed out so I can continue fiddling with it.

There are new coding errors in it, I'm afraid......I'm still after a decent texteditor that will show me where I've bashed the XML....searching by hand through 365 lines of coding is annoying, although not as bad as it could be.....I'm glad I'm not doing something that's actually pushing the boundaries of coding.

EDIT: New pastebin. I've weeded out a load of errors, but there's still basic errors that I've left in by accident.
Mischievous local moderator. She/Her pronouns.
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Errors are sorted, and I'm now working again on spreading this out and balancing it.

I'm thinking about splitting development in half: 1st, overwriting the standard NAMI mine launcher with a new set of munitions, ranging from the classic (and rather poor-performing) CRM100, through to more specialised EMP and Thermo mines (The XM900s warhead works rather well as a static mine....and is looking a very promising system to use). This depends on whether I can get overwriting working.

2nd....The Long range deployment systems are MASSIVELY unbalanced at the level of the normal mine weapons. I'm thinking of over-writing them into the NAMI heavy instead....as they ARE based off the M5 originally, and use heavy missiles to get away from the ship before deploying.


The trick I need to work out is how to get the mines on the long-range deployment system to frag properly. The current system doesn't want to have fragmenting fragments from a fragmenting missile (fragment :P )...thus unless the mines are set off immediately after deployment, they won't frag....thus robbing them of most of the damage.
Mischievous local moderator. She/Her pronouns.
speedofsquid
Commonwealth Pilot
Commonwealth Pilot
Posts: 55
Joined: Wed Aug 27, 2008 6:30 pm
Location: USA

Shrike wrote:The pastebin is HERE.
On ll. 162-173 and ll. 201-202 the attributes are outside the tags again.
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

speedofsquid wrote:
Shrike wrote:The pastebin is HERE.
On ll. 162-173 and ll. 201-202 the attributes are outside the tags again.

That's already fixed in my version. :)
Mischievous local moderator. She/Her pronouns.
Post Reply