Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Poll

Which faction do you like the most?

The Sidus Dim
The CDF
The Ferrus
The independents
The infection
The farmers
The Tholian Directive

Pages: 1 ... 154 155 [156] 157 158 ... 188

Author Topic: Project CAELUS ,the biggest project starsector will ever see. (Alpha 1)  (Read 807540 times)

acidzombie

  • Commander
  • ***
  • Posts: 127
  • Random Guy61
    • View Profile

Plz take a look on one of Lazy Wizards last posts and then look at mine then i think you understand what i mean :)
Logged
What is worth dying for is for you to choose.

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile

Oh, that. Well, no, I don't think that'll be needed. Although I suppose lazywizard could answer that post better that me.
Logged

Verrius

  • Captain
  • ****
  • Posts: 369
    • View Profile

Isn't it possible just to have a fleet go to a certain area, and simply set the amount of items it has? Like for an ore to be at 200 or what not? It doesn't seem to complicated.

Yes, it's easy to do that. The hard part is making a fleet stay somewhere for any length of time. I suppose we could claim they are just picking up a shipment from a mine on the asteroid instead of doing the mining themselves, though.
Actually this is possible, and very easy! Alex gave me enough info to make a solution.

I suck at explaining though, so feel free to dissect the Fleet Control Mod.

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile

Haha.

(Lazywizard?)

Oh hai thar, verrius!  You canz haz helps us?
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile

I was thinking of choosing random asteroids to contain mines at sector generation, and have them generate ore over time. Once the ore at an asteroid reaches a certain threshold, the faction that owns the mine sends a fleet to pick up the ore. Mines might eventually run out of ore, but I'll have to see how frustrating that gets first. :)

Yes, it's easy to do that. The hard part is making a fleet stay somewhere for any length of time. I suppose we could claim they are just picking up a shipment from a mine on the asteroid instead of doing the mining themselves, though.
Actually this is possible, and very easy! Alex gave me enough info to make a solution.

I suck at explaining though, so feel free to dissect the Fleet Control Mod.

Awesome. What solution did you go with, the setLocation one? And which file should I be looking in?

If I did go with mining fleets, the hacky solution I was going to use was having the fleet generate a 0-speed mining platform when it reached the asteroid, which would greatly reduce movement for the fleet while present. But I didn't think it would work well since asteroids move on their own ;).
Logged

Verrius

  • Captain
  • ****
  • Posts: 369
    • View Profile

Everything you need for mining is all in a delicious little package called vfleet_MiningEvents. In fact, you SHOULD be able to take most of the code without having to change much.

How it works, is it checks every fleet if it has mining power. If it does, it is automatically a miner. You may or may not like this. Most of the action happens in the "public void advance(SectorAPI sector, LocationAPI location)" method.

Here is where you determine whether or not to chase an asteroid:
Code
//Check Ore count
float oreCount = 0;
float oreSize = 5;
while(fleetCargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "vfleet_ore", 1)) {
oreCount = oreCount + 1;
}
fleetCargo.addItems(CargoAPI.CargoItemType.RESOURCES, "vfleet_ore", oreCount);

if (oreCount * oreSize > cargoCapacity) {
//Find location to dump stuff
FactionAPI fleetFaction = fleet.getFaction();
String fleetFactionID = fleetFaction.getId();
SectorEntityToken returnLocation = system.getEntityByName("Fleet Storage");

if (fleetFactionID.equals("hegemony")) {
returnLocation = system.getEntityByName("Orbital Station");
}

if (fleetFactionID.equals("tritachyon")) {
returnLocation = system.getEntityByName("Corporate HQ");
}

if (fleetFactionID.equals("independant")) {
returnLocation = system.getEntityByName("Orbital Station");
}

Script script = minerArrived1();
[b]fleet.clearAssignments();
fleet.addAssignment(FleetAssignment.GO_TO_LOCATION, returnLocation, 1000, script); //Tell it to go to go home.[/b]
}
else {

[b]fleet.clearAssignments();
fleet.addAssignment(FleetAssignment.GO_TO_LOCATION, targetAsteroid, 1); //Tell it to go to the asteroid.[/b]
}
I don't know if the fleet.clearAssignments(); is needed, but I added it to be safe. This way, every frame it's told to go to the asteroid.
HOWEVER, the miners STILL think they're pirate hunters. If you want to put an end to that, you probably saw Alex's OTHER solution:
Heck, you could actually set up a (really, really hacky) custom AI for the fleet if you wanted. CampaignFleetAPI.setLocation() lets you put a fleet anywhere you want, so you could simulate movement that way. You'd be fighting against their AI, though, so I don't know how well that would work in practice, and whether I should even bring it up :)
But my patience is extremely limited. I threatened my computer's life far too many times just trying to make that mod work. If anyone can do this though, I'm sure LazyWizard could :p.

Oh, I do have a request... While your looking through the files, do forgive my messes. I tend to mangle EVERYTHING in my vigorous attempts to get from point A to point bloody B.

TheMessiah

  • Captain
  • ****
  • Posts: 315
  • Captain of the Sidus Dim
    • View Profile

Anything in photoshop I could help with? New graphics for the front page?
Logged

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile

I suppose. We would always be needing some portraits. Or, I know, you could make is new crates and fuel and such :D
Logged

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile

everyone who votes for ferrus gets a cookie!!!  ;D
Logged
Fractalsoftworks limited edition ban hammer.

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile

Hehe,  I voted for the tholian directive :D
Logged

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile

wo voted for the independents?
there not even in-game...
i am probaply one of the only once that know how there ships look( except the starting ship)
same with the ferrus.... :P
and why are the farmers in the poll...
they dont even have sprites yet.
Logged
Fractalsoftworks limited edition ban hammer.

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile

They do.

Remember those treasure planet sprites you made?
Logged

TheHappyFace

  • Admiral
  • *****
  • Posts: 1168
  • The critic
    • View Profile

They do.

Remember those treasure planet sprites you made?
will those be used for the farmers?

hmm. i dont have any problem with it.
i just still dont get them...
farming can best happen on planets not in space.
the only thing that could happen in space would be the transportation.
which could best be done by the faction themselfs or the independents...
Logged
Fractalsoftworks limited edition ban hammer.

TheMessiah

  • Captain
  • ****
  • Posts: 315
  • Captain of the Sidus Dim
    • View Profile

They do.

Remember those treasure planet sprites you made?
will those be used for the farmers?

hmm. i dont have any problem with it.
i just still dont get them...
farming can best happen on planets not in space.
the only thing that could happen in space would be the transportation.
which could best be done by the faction themselfs or the independents...
Well they're angry farmers! They hate the Sidus Dim, but the Sidus Dim doesn't see them as a threat.
Logged

arcibalde

  • Admiral
  • *****
  • Posts: 1730
    • View Profile

everyone who votes for ferrus gets a cookie!!!  ;D

COOOOOKIZZZZZZZZZZZZZZZ!!!!!

ME WANT NAU!!
Logged
Creator of:
Relics MOD - vanilla balanced - Campaign integrated
Vanilla addon MOD - vanilla balanced - Campaign integrated
Project ONI MOD - mission only
Pages: 1 ... 154 155 [156] 157 158 ... 188