Soyjak Tycoon Open World update showcase WIP

This is probally one of the biggest updates im ever going to make and its going to kill me. So lets all sit back and explain how we got here.

First off if you don’t know soyjak tycoon originally was going to have AI units that you could spawn in. There in the game and work perfectly however I felt like they could be used for more. Thats where the idea of making a open world map where they can be properly used set in.

Here was the AI before I came up with the idea.

I have more but pretty much thats the general gist of it.
Ok so how is this going to work. Well with any idea I need a plan and I came up with a pretty good one.
Each part of the open world map is set into sections and then we just load in the ai units when a player gets put into that section. This means however we have to track when the player leaves the game, dies, moves etc.

--Store the value of every players position

players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
	local currentplayerpos = Instance.new("StringValue", player)
	currentplayerpos.Name = "placeonmap"
	--we want to reset the value when the Character is added rather than the player so the ai does not instantly stop when they die and it looks jarring
	player.CharacterAdded:Connect(function()
		currentplayerpos.Value = "main-island"
		game.ServerScriptService.OpenWorldManager:FindFirstChild(currentplayerpos.Value).Value += 1 

		player.Character:WaitForChild("Humanoid").Died:Connect(function()
			if(game.ServerScriptService.OpenWorldManager:FindFirstChild(currentplayerpos.Value).Value > 0 ) then
				game.ServerScriptService.OpenWorldManager:FindFirstChild(currentplayerpos.Value).Value -= 1 
			end
			currentplayerpos.Value = "none"

		end)
	end)	

end)

--move ai to serverstorage. Its the servers job now to do this.
game.Workspace.Openworldaispawn.j1praying.Parent = game.ServerStorage.Openworldaiholder
game.Workspace.Openworldaispawn.j1walkpath.Parent = game.ServerStorage.Openworldaiholder
game.Workspace.Openworldaispawn.Jannynormalunit.Parent = game.ServerStorage.Openworldaiholder
game.Workspace.Openworldaispawn.scriptedferalfight.Parent = game.ServerStorage.Openworldaiholder
game.Workspace.Openworldaispawn.Feralherounitsm1.Parent = game.ServerStorage.Openworldaiholder

--Main ai handler for one-oneOW
game.ServerScriptService.OpenWorldManager["one-oneOW"].Changed:Connect(function()
	if game.ServerScriptService.OpenWorldManager["one-oneOW"].Value == 1 then
		game.ServerScriptService.gameai.Openworldai.JannyAIpray.Enabled = true
		game.ServerScriptService.gameai.Openworldai.JannyAiPatrol.Enabled = true
		task.wait(0.3) --just in case the scripts dont catch the childadded because its to fast
		game.ServerStorage.Openworldaiholder.j1praying:Clone().Parent = game.Workspace
		game.ServerStorage.Openworldaiholder.j1walkpath:Clone().Parent = game.Workspace
		game.Workspace.Openworldaispawn.j1praying:FindFirstChild("0").HumanoidRootPart.Anchored = true
		task.wait(0.2)
		game.Workspace.Openworldaispawn.j1praying:FindFirstChild("0").HumanoidRootPart.Anchored = false



	else if game.ServerScriptService.OpenWorldManager["one-oneOW"].Value == 0 then
			game.Workspace.j1praying:Destroy()
			game.Workspace.j1walkpath:Destroy()
		end
		game.ServerScriptService.gameai.Openworldai.JannyAIpray.Enabled = false
		game.ServerScriptService.gameai.Openworldai.JannyAiPatrol.Enabled = false
	end 
end)
game.ServerScriptService.OpenWorldManager["one-twoOW"].Changed:Connect(function()
	if game.ServerScriptService.OpenWorldManager["one-twoOW"].Value == 1 then
		game.ServerScriptService.gameai.Openworldai["JannyAi-General"].Enabled = true
		game.ServerScriptService.gameai.Openworldai["Feralai"].Enabled = true

		task.wait(0.6) --just in case the scripts dont catch the childadded because its to fast
		Instance.new("Model", game.Workspace).Name = "Jannynormalunit"
		task.wait(0.3)
		game.ServerStorage.Openworldaiholder.Jannynormalunit:FindFirstChild("0").Parent = game.Workspace.Jannynormalunit
		game.ServerStorage.Openworldaiholder.scriptedferalfight:Clone().Parent = game.workspace
		game.ServerStorage.Openworldaiholder.Feralherounitsm1:Clone().Parent = game.Workspace

	
	else if game.ServerScriptService.OpenWorldManager["one-twoOW"].Value == 0 then
		else if game.ServerScriptService.OpenWorldManager["one-oneOW"].Value >= 1 then
				return
			end
		end
		game.Workspace.scriptedferalfight:Destroy()
		game.Workspace.Feralherounitsm1:Destroy()
		Instance.new("Model", game.Workspace).Name = "scriptedferalfight"
		game.Workspace.Jannynormalunit:Destroy()	
		Instance.new("Model", game.Workspace).Name = "Jannynormalunit"

	end

end)

I made a basic prototype of it. Pretty much every single ai unit gets moved to serverstorage and then when its time cloned into workspace at there position to simulate a open world environment like there all there.

Im still semi working on the third part of the map for the first mission for but it will act as the first base.

I scribbled a Entrance to the open world base using gimp and figuring out the US highway font to make these models to make cool warning signs.

Anyways lets talk about AI design now.

The last ai was purely combat, when it came to after the battle or before the battle they were kind of wandering idiots. In a open world you typically see enemys doing stuff so I wanted to replicate that.

I made the AI be able to interact and be in unique states

Some when spawned in will patrol a area.

and we also have general units which just fight normally. Sometimes you might stumble across 2 ai factions fighting each other.

And I updated the quest system to deal with this so we can have sort of mini quests. I think the director of halo combat eveolved said something very true that video games are 30 seconds of fun repeated over and over and over and over again. and hes 100% right.

For example after a firefight and saving some ai units more will pop out of this base(Yes Im still working on it its a prototype) and come to offer you a sidequest.

2 Likes

lets talk about ai design and whats new.

I split the ai into different subunits.
for the janny theres the prayer janny(The ones that pray near a hologram of there master)
Patrol Janny(Jannys that follow a patrol path).
and also general jannies which just fight and don’t follow a standard patrol system.
I also updated there code to fix the alert system. Now when shooting, hitting or dealing damage to them while they cant see you they will become alert of you and look at your position and charge you.


There animations have also been updated including there taunt and damaged animations

They have more but you get the gist.

heres a early version of my rework for them from about 6 days ago when I came up with the open world idea(There RNG system for deciding weather to strafe or fire standing still is favored way to much so thats why it looks bad)

As for the soldiers not much has changed about them except now they can lose their helmet in battle if shot at.


Im thinking of making variants like a NATO variant of the feralsolider based off this one jak of feral I saw

1 Like

image
im not sure why roblox decided to change my title into the most disgusting breadfreak loving people language on earth but ok

Cool part about my ai system is that we can let them know that they can fight anywhere they want but we can make them perfer to move and fight towards a specific area.

Pretty cool! It was fun fighting with it.

1 Like

it did this to me when i said libre and gratis in a post, very annoying