Author Topic: Fighter base  (Read 365 times)

Qihao56

  • Newbie
  • *
  • Posts: 11
Fighter base
« on: April 12, 2017, 06:25:02 pm »
Hello everyone, I would like some help with this project, right now it is classified, however I need some help with it as in can anyone help me make a custom carrier module, I have the images ready.
« Last Edit: May 15, 2017, 05:11:28 pm by Qihao56 »

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Redacted]
« Reply #1 on: April 13, 2017, 08:34:20 am »
For really helping you we need more info i'm afraid.
If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

GoodMorning

  • Map Maker
  • *****
  • Posts: 2913
  • (Pusillanimous)
Re: [Redacted]
« Reply #2 on: April 13, 2017, 08:54:49 am »
Let's see... From your previous posts and the general pattern of fighter bases, you will need:

1. The standard custom module scripts.
2. A fighter-spawner script to be the brain of the module.
3. Another script for the fighter unit itself.
4. (Optional) Another script for the shots.

(1) is done, (2) is fairly simple, (3) is rather more difficult, (4) is straightforward.
A narrative is a lightly-marked path to another reality.

Qihao56

  • Newbie
  • *
  • Posts: 11
Re: [Redacted]
« Reply #3 on: May 01, 2017, 05:33:28 pm »
Here are what I'm looking for: A script so the fighters can work, it is supposed to be a MASSIVELY more powerful than the vanilla one, it's role is to be usable in bigger vessels or be a slightly more reasonable fighter base, I might make a separate post so people can use this.

Fighter specs: 2 guns, each loaded with 100 bullets that does 4 damage, 2 fighters per base and each fighter costing 40 energy to rearm

GoodMorning

  • Map Maker
  • *****
  • Posts: 2913
  • (Pusillanimous)
Re: [Redacted]
« Reply #4 on: May 01, 2017, 08:34:06 pm »
I really do encourage you to at least try to do this yourself. I have written some (bad, skeleton) code to start you off. See also the custom modules thread. The project you have decided to start with is far more complicated than anything used in the Story or Inception missions. This code is bad due to being unclear in places and this browser having an alternate use for the "tab" key. (Yes, I could copy/paste the tab character in from elsewhere, but that feels like work, and PRPL should feel like fun :) .)

Code: [Select]
#Fighter
once
10 ->Range
100 ->Shots
endonce

@FighterMovement

@FiringLogic
@FiringLogic

Self <-Shots eq0 if Self 0 DestroyUnit endif

:FighterMovement
#Your turn

:FiringLogic
<-Shots eq0 if return endif
CurrentCoords <-Range Self GetUnitIsEnemy not 0 0 0 0 GetNearestTarget dup -1 eq if pop return endif
"CannonShot" CurrentCoords CreateUnit ->Shot <-Shot swap <-Shot dup 4 SetUnitMaxHealth 4 SetUnitHealth
Self GetUnitIsEnemy InitCannonShot
<-Shots 1 sub ->Shots

:awake
#Set graphics here

Code: [Select]
#Base

#Change images to suit your needs here, see other custom modules for examples.

<-Built not if return endif
once
-1 ->FighterA -1 ->FighterB
endonce

<-FighterA -1 eq <-FighterA GetUnitIsDestroyed or if
@CreateFighter ->FighterA
endif

<-FighterB -1 eq <-FighterB GetUnitIsDestroyed or if
@CreateFighter ->FighterB
endif

:CreateFighter
<-Ship GetShipEnergy 40 lt if -1 return endif
<-Ship <-Ship GetShipEnergy 40 sub SetShipEnergy
"PRPLCORE" CurrentCoords CreateUnit dup "FighterUnit.prpl" AddScriptToUnit
A narrative is a lightly-marked path to another reality.

Qihao56

  • Newbie
  • *
  • Posts: 11
Re: [Redacted]
« Reply #5 on: May 10, 2017, 12:19:26 pm »
Thanks, it's something i can start with, I also might start a post with a main purpose to finish this module and make it better.

GoodMorning

  • Map Maker
  • *****
  • Posts: 2913
  • (Pusillanimous)
Re: [Redacted]
« Reply #6 on: May 10, 2017, 07:49:37 pm »
That would be this thread, would it not?

You might want to change the title, however.
A narrative is a lightly-marked path to another reality.

Qihao56

  • Newbie
  • *
  • Posts: 11
Re: [Redacted]
« Reply #7 on: May 13, 2017, 06:55:58 pm »
Yea I probably should


Remind me how to do that again
« Last Edit: May 13, 2017, 07:00:41 pm by Qihao56 »

Nicant

  • Map Maker
  • *****
  • Posts: 400
  • Thomas is very crossed
Re: [Redacted]
« Reply #8 on: May 13, 2017, 10:36:17 pm »
Yea I probably should


Remind me how to do that again

Scroll all the way to the top of this post and press modify. There, you can change the title.
Why do you park on a driveway, but drive on a parkway? :o

tornado

  • Full Member
  • ***
  • Posts: 291
  • no questions asked and none answered
Re: [Redacted]
« Reply #9 on: May 14, 2017, 12:28:28 pm »
... and PRPL should feel like fun :) .)

So this is where I've been going wrong.
Now CEO of Particular Endeavors. http://knucklecracker.com/forums/index.php?topic=23752.new#new
We apologize for all inconveniences that we caused.
Quote
first, you have to imagine a very big box, fitting inside a very samll box.
then, you have to build one

Qihao56

  • Newbie
  • *
  • Posts: 11
Re: Fighter base
« Reply #10 on: May 15, 2017, 05:12:23 pm »
Alright now lets start assembling a flight pattern for the fighters
Any suggestions or prebuilt code

Nicant

  • Map Maker
  • *****
  • Posts: 400
  • Thomas is very crossed
Re: Fighter base
« Reply #11 on: May 15, 2017, 08:54:40 pm »
To start, you need a way of the fighter moving. GoodMorning has made a boilerplate code for the basics of the fighter moving. You can find it HERE around the bottom of the post
Why do you park on a driveway, but drive on a parkway? :o

GoodMorning

  • Map Maker
  • *****
  • Posts: 2913
  • (Pusillanimous)
Re: Fighter base
« Reply #12 on: May 15, 2017, 09:27:55 pm »
Somewhere, there is a thread from when someone was CRPL-ing an airstrip. This involved discussion about everything from turn angles to waypoints. The existing PRPL fighters have a simplified system, probably to allow a fighter to land on a retreating Carrier.

Since you wanted fighters specifically designed to eclipse every in-game weapon, you probably don't care too much about exact movements, minimum turn radii, stall speeds, and waypoints. Therefore, you will probably want to queue a move to your target, shooting all the way, and with an acceleration/deceleration profile which brings you to a halt at the target. You will then repeat this until you run out of ammunition, and turn for home. Move to a point a little way out from the end of the airstrip, and then land by moving along the airstrip axis (at this point your fighter moves as if it were part of the ship) and decelerating to a halt at the end. Fade out.

If you want better dynamics, you could limit to one fighter at a time, and allow it to land on either end of the airstrip. Further, adding a minimum turn rate (velocity dependent) and a minimum speed could make for an interesting unit, as it would limit the base-ship movement during the landing sequence. That is, if the airstrip turns too much, the fighter would need to break off and come around again. Making the player pay to rebuild it if it runs out of "fuel" could be an interesting extension.
A narrative is a lightly-marked path to another reality.

Qihao56

  • Newbie
  • *
  • Posts: 11
Re: Fighter base
« Reply #13 on: May 17, 2017, 10:37:57 am »
Hmm, sounds interesting, however, im just gonna focus on the basics of the fighter
Im looking for a slightly more realistic fighter strip, so the ammunition and cost is going to go up by quite a bit. the only thing that will be different (or have a big difference) from vanilla CV is that it will have a much longer range giving it a proper role of "aircraft carrier"
so energy should cost around 70-90 per fighter for 50 munitions on 2 guns with a fighter range of 300 or 400